github.com/pingcap/ticdc@v0.0.0-20220526033649-485a10ef2652/docker/config/tidb.toml (about)

     1  # TiDB Configuration.
     2  
     3  # TiDB server host.
     4  host = "0.0.0.0"
     5  
     6  # TiDB server port.
     7  port = 4000
     8  
     9  # Registered store name, [tikv, mocktikv]
    10  store = "mocktikv"
    11  
    12  # TiDB storage path.
    13  path = "/tmp/tidb"
    14  
    15  # The socket file to use for connection.
    16  socket = ""
    17  
    18  # Run ddl worker on this tidb-server.
    19  run-ddl = true
    20  
    21  # Schema lease duration, very dangerous to change only if you know what you do.
    22  lease = "0"
    23  
    24  # When create table, split a separated region for it. It is recommended to
    25  # turn off this option if there will be a large number of tables created.
    26  split-table = true
    27  
    28  # The limit of concurrent executed sessions.
    29  token-limit = 1000
    30  
    31  # Only print a log when out of memory quota.
    32  # Valid options: ["log", "cancel"]
    33  oom-action = "log"
    34  
    35  # Set the memory quota for a query in bytes. Default: 32GB
    36  mem-quota-query = 34359738368
    37  
    38  # Enable coprocessor streaming.
    39  enable-streaming = false
    40  
    41  # Set system variable 'lower_case_table_names'
    42  lower-case-table-names = 2
    43  
    44  [log]
    45  # Log level: debug, info, warn, error, fatal.
    46  level = "error"
    47  
    48  # Log format, one of json, text, console.
    49  format = "text"
    50  
    51  # Disable automatic timestamp in output
    52  disable-timestamp = false
    53  
    54  # Stores slow query log into separated files.
    55  slow-query-file = ""
    56  
    57  # Queries with execution time greater than this value will be logged. (Milliseconds)
    58  slow-threshold = 300
    59  
    60  # Queries with internal result greater than this value will be logged.
    61  expensive-threshold = 10000
    62  
    63  # Maximum query length recorded in log.
    64  query-log-max-len = 2048
    65  
    66  # File logging.
    67  [log.file]
    68  # Log file name.
    69  filename = ""
    70  
    71  # Max log file size in MB (upper limit to 4096MB).
    72  max-size = 300
    73  
    74  # Max log file keep days. No clean up by default.
    75  max-days = 0
    76  
    77  # Maximum number of old log files to retain. No clean up by default.
    78  max-backups = 0
    79  
    80  # Rotate log by day
    81  log-rotate = true
    82  
    83  [security]
    84  # Path of file that contains list of trusted SSL CAs for connection with mysql client.
    85  ssl-ca = ""
    86  
    87  # Path of file that contains X509 certificate in PEM format for connection with mysql client.
    88  ssl-cert = ""
    89  
    90  # Path of file that contains X509 key in PEM format for connection with mysql client.
    91  ssl-key = ""
    92  
    93  # Path of file that contains list of trusted SSL CAs for connection with cluster components.
    94  cluster-ssl-ca = ""
    95  
    96  # Path of file that contains X509 certificate in PEM format for connection with cluster components.
    97  cluster-ssl-cert = ""
    98  
    99  # Path of file that contains X509 key in PEM format for connection with cluster components.
   100  cluster-ssl-key = ""
   101  
   102  [status]
   103  # If enable status report HTTP service.
   104  report-status = true
   105  
   106  # TiDB status port.
   107  status-port = 10080
   108  
   109  # Prometheus pushgateway address, leaves it empty will disable prometheus push.
   110  metrics-addr = "pushgateway:9091"
   111  
   112  # Prometheus client push interval in second, set \"0\" to disable prometheus push.
   113  metrics-interval = 15
   114  
   115  [performance]
   116  # Max CPUs to use, 0 use number of CPUs in the machine.
   117  max-procs = 0
   118  # StmtCountLimit limits the max count of statement inside a transaction.
   119  stmt-count-limit = 5000
   120  
   121  # Set keep alive option for tcp connection.
   122  tcp-keep-alive = true
   123  
   124  # The maximum number of retries when commit a transaction.
   125  retry-limit = 10
   126  
   127  # Whether support cartesian product.
   128  cross-join = true
   129  
   130  # Stats lease duration, which influences the time of analyze and stats load.
   131  stats-lease = "3s"
   132  
   133  # Run auto analyze worker on this tidb-server.
   134  run-auto-analyze = true
   135  
   136  # Probability to use the query feedback to update stats, 0 or 1 for always false/true.
   137  feedback-probability = 0.0
   138  
   139  # The max number of query feedback that cache in memory.
   140  query-feedback-limit = 1024
   141  
   142  # Pseudo stats will be used if the ratio between the modify count and
   143  # row count in statistics of a table is greater than it.
   144  pseudo-estimate-ratio = 0.7
   145  
   146  [proxy-protocol]
   147  # PROXY protocol acceptable client networks.
   148  # Empty string means disable PROXY protocol, * means all networks.
   149  networks = ""
   150  
   151  # PROXY protocol header read timeout, unit is second
   152  header-timeout = 5
   153  
   154  [plan-cache]
   155  enabled = false
   156  capacity = 2560
   157  shards = 256
   158  
   159  [prepared-plan-cache]
   160  enabled = false
   161  capacity = 100
   162  
   163  [opentracing]
   164  # Enable opentracing.
   165  enable = false
   166  
   167  # Whether to enable the rpc metrics.
   168  rpc-metrics = false
   169  
   170  [opentracing.sampler]
   171  # Type specifies the type of the sampler: const, probabilistic, rateLimiting, or remote
   172  type = "const"
   173  
   174  # Param is a value passed to the sampler.
   175  # Valid values for Param field are:
   176  # - for "const" sampler, 0 or 1 for always false/true respectively
   177  # - for "probabilistic" sampler, a probability between 0 and 1
   178  # - for "rateLimiting" sampler, the number of spans per second
   179  # - for "remote" sampler, param is the same as for "probabilistic"
   180  # and indicates the initial sampling rate before the actual one
   181  # is received from the mothership
   182  param = 1.0
   183  
   184  # SamplingServerURL is the address of jaeger-agent's HTTP sampling server
   185  sampling-server-url = ""
   186  
   187  # MaxOperations is the maximum number of operations that the sampler
   188  # will keep track of. If an operation is not tracked, a default probabilistic
   189  # sampler will be used rather than the per operation specific sampler.
   190  max-operations = 0
   191  
   192  # SamplingRefreshInterval controls how often the remotely controlled sampler will poll
   193  # jaeger-agent for the appropriate sampling strategy.
   194  sampling-refresh-interval = 0
   195  
   196  [opentracing.reporter]
   197  # QueueSize controls how many spans the reporter can keep in memory before it starts dropping
   198  # new spans. The queue is continuously drained by a background go-routine, as fast as spans
   199  # can be sent out of process.
   200  queue-size = 0
   201  
   202  # BufferFlushInterval controls how often the buffer is force-flushed, even if it's not full.
   203  # It is generally not useful, as it only matters for very low traffic services.
   204  buffer-flush-interval = 0
   205  
   206  # LogSpans, when true, enables LoggingReporter that runs in parallel with the main reporter
   207  # and logs all submitted spans. Main Configuration.Logger must be initialized in the code
   208  # for this option to have any effect.
   209  log-spans = false
   210  
   211  #  LocalAgentHostPort instructs reporter to send spans to jaeger-agent at this address
   212  local-agent-host-port = ""
   213  
   214  [tikv-client]
   215  # Max gRPC connections that will be established with each tikv-server.
   216  grpc-connection-count = 16
   217  
   218  # After a duration of this time in seconds if the client doesn't see any activity it pings
   219  # the server to see if the transport is still alive.
   220  grpc-keepalive-time = 10
   221  
   222  # After having pinged for keepalive check, the client waits for a duration of Timeout in seconds
   223  # and if no activity is seen even after that the connection is closed.
   224  grpc-keepalive-timeout = 3
   225  
   226  # max time for commit command, must be twice bigger than raft election timeout.
   227  commit-timeout = "41s"
   228  
   229  [binlog]
   230  
   231  # Socket file to write binlog.
   232  binlog-socket = ""
   233  
   234  # WriteTimeout specifies how long it will wait for writing binlog to pump.
   235  write-timeout = "15s"
   236  
   237  # If IgnoreError is true, when writting binlog meets error, TiDB would stop writting binlog,
   238  # but still provide service.
   239  ignore-error = false