dbinoj

my.cnf - max_allowd_packet prob

Aug 10th, 2012
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 6.59 KB | None | 0 0
  1. [mysqld]
  2. datadir=/var/lib/mysql
  3. socket=/var/lib/mysql/mysql.sock
  4. user=mysql
  5. # Default to using old password format for compatibility with mysql 3.x
  6. # clients (those using the mysqlclient10 compatibility package).
  7. old_passwords=1
  8.  
  9. default_character_set = utf8
  10. collation_server = utf8_general_ci
  11. character_set_server = utf8
  12.  
  13. # The maximum amount of concurrent sessions the MySQL server will
  14. # allow. One of these connections will be reserved for a user with
  15. # SUPER privileges to allow the administrator to login even if the
  16. # connection limit has been reached.
  17. max_connections = 75
  18.  
  19. # The number of open tables for all threads. Increasing this value
  20. # increases the number of file descriptors that mysqld requires.
  21. # Therefore you have to make sure to set the amount of open files
  22. # allowed to at least 4096 in the variable "open-files-limit" in
  23. # section [mysqld_safe]
  24. table_cache = 256
  25.  
  26. # The maximum size of a query packet the server can handle as well as
  27. # maximum query size server can process (Important when working with
  28. # large BLOBs).  enlarged dynamically, for each connection.
  29. max_allowed_packet = 32M
  30.  
  31. # Query cache is used to cache SELECT results and later return them
  32. # without actual executing the same query once again. Having the query
  33. # cache enabled may result in significant speed improvements, if your
  34. # have a lot of identical queries and rarely changing tables. See the
  35. # "Qcache_lowmem_prunes" status variable to check if the current value
  36. # is high enough for your load.
  37. # Note: In case your tables change very often or if your queries are
  38. # textually different every time, the query cache may result in a
  39. # slowdown instead of a performance improvement.
  40. query_cache_size = 64M
  41.  
  42. # Only cache result sets that are smaller than this limit. This is to
  43. # protect the query cache of a very large result set overwriting all
  44. # other query results.
  45. query_cache_limit = 2M
  46.  
  47. # Table type which is used by default when creating new tables, if not
  48. # specified differently during the CREATE TABLE statement.
  49. default_table_type = InnoDB
  50.  
  51. # Maximum size for internal (in-memory) temporary tables. If a table
  52. # grows larger than this value, it is automatically converted to disk
  53. # based table This limitation is for a single table. There can be many
  54. # of them.
  55. tmp_table_size = 64M
  56.  
  57. # Maximum allowed size for a single HEAP (in memory) table. This option
  58. # is a protection against the accidential creation of a very large HEAP
  59. # table which could otherwise use up all memory resources.
  60. max_heap_table_size = 64M
  61.  
  62. # How many threads we should keep in a cache for reuse. When a client
  63. # disconnects, the client's threads are put in the cache if there aren't
  64. # more than thread_cache_size threads from before.  This greatly reduces
  65. # the amount of thread creations needed if you have a lot of new
  66. # connections. (Normally this doesn't give a notable performance
  67. # improvement if you have a good thread implementation.)
  68. thread_cache_size = 4
  69.  
  70. ### Per-connection configuration ###
  71.  
  72. # Sort buffer is used to perform sorts for some ORDER BY and GROUP BY
  73. # queries. If sorted data does not fit into the sort buffer, a disk
  74. # based merge sort is used instead - See the "Sort_merge_passes"
  75. # status variable. Allocated per thread if sort is needed.
  76. sort_buffer_size = 2M
  77.  
  78. # This buffer is used for the optimization of full JOINs (JOINs without
  79. # indexes). Such JOINs are very bad for performance in most cases
  80. # anyway, but setting this variable to a large value reduces the
  81. # performance impact. See the "Select_full_join" status variable for a
  82. # count of full JOINs. Allocated per thread if full join is found
  83. join_buffer_size = 2M
  84.  
  85. # Thread stack size to use. This amount of memory is always reserved at
  86. # connection time. MySQL itself usually needs no more than 64K of
  87. # memory, while if you use your own stack hungry UDF functions or your
  88. # OS requires more stack for some operations, you might need to set this
  89. # to a higher value.
  90. thread_stack = 192K
  91.  
  92. ###
  93.  
  94. # Log slow queries. Slow queries are queries which take more than the
  95. # amount of time defined in "long_query_time" or which do not use
  96. # indexes well, if log_long_format is enabled. It is normally good idea
  97. # to have this turned on if you frequently add new queries to the
  98. # system.
  99. log_slow_queries
  100.  
  101. # All queries taking more than this amount of time (in seconds) will be
  102. # trated as slow. Do not use "1" as a value here, as this will result in
  103. # even very fast queries being logged from time to time (as MySQL
  104. # currently measures time with second accuracy only).
  105. long_query_time = 2
  106.  
  107. ###
  108.  
  109. # *** INNODB Specific options ***
  110.  
  111. # InnoDB, unlike MyISAM, uses a buffer pool to cache both indexes and
  112. # row data. The bigger you set this the less disk I/O is needed to
  113. # access data in tables. On a dedicated database server you may set this
  114. # parameter up to 80% of the machine physical memory size. Do not set it
  115. # too large, though, because competition of the physical memory may
  116. # cause paging in the operating system.  Note that on 32bit systems you
  117. # might be limited to 2-3.5G of user level memory per process, so do not
  118. # set it too high.
  119. innodb_buffer_pool_size = 256M
  120.  
  121. # If set to 1, InnoDB will flush (fsync) the transaction logs to the
  122. # disk at each commit, which offers full ACID behavior. If you are
  123. # willing to compromise this safety, and you are running small
  124. # transactions, you may set this to 0 or 2 to reduce disk I/O to the
  125. # logs. Value 0 means that the log is only written to the log file and
  126. # the log file flushed to disk approximately once per second. Value 2
  127. # means the log is written to the log file at each commit, but the log
  128. # file is only flushed to disk approximately once per second.
  129. innodb_flush_log_at_trx_commit = 0
  130.  
  131. # The size of the buffer InnoDB uses for buffering log data. As soon as
  132. # it is full, InnoDB will have to flush it to disk. As it is flushed
  133. # once per second anyway, it does not make sense to have it very large
  134. # (even with long transactions).
  135. innodb_log_buffer_size = 4M
  136.  
  137. # Size of each log file in a log group. You should set the combined size
  138. # of log files to about 25%-100% of your buffer pool size to avoid
  139. # unneeded buffer pool flush activity on log file overwrite. However,
  140. # note that a larger logfile size will increase the time needed for the
  141. # recovery process.
  142. innodb_log_file_size = 256M
  143.  
  144. # The flush method InnoDB will use for Log. The tablespace always uses
  145. # doublewrite flush logic. The default value is "fdatasync", another
  146. # option is "O_DSYNC".
  147. innodb_flush_method=O_DSYNC
  148.  
  149.  
  150.  
  151. [mysqld_safe]
  152. log-error=/var/log/mysqld.log
  153. pid-file=/var/run/mysqld/mysqld.pid
Advertisement
Add Comment
Please, Sign In to add comment