Answer the question
In order to leave comments, you need to log in
MySQL server has gone away from a lot of requests?
It is necessary to do ~ 500 insert requests every minute (statistical data). To these inserts, 1 more update query is added to another table on the "before insert" trigger ( as suggested by SagePtr ). Statistics are collected by a python script in several threads (currently 2), at about 200 requests I get "(2006, 'MySQL server has gone away')".
MySQL runs at 2400MHz, 512MB of RAM. The parameters in my.cnf are:
key_buffer = 256M
max_allowed_packet = 32M
thread_stack = 256K
thread_cache_size = 8
query_cache_limit = 8M
query_cache_size = 64M
query_cache_type = 1
Answer the question
In order to leave comments, you need to log in
it’s logical that you can’t optimize here too much, raise the server parameters, it makes no sense to expect speed on the most rogue vpsk.
Increase the interactive_timeout (or wait_timeout) server variable
dev.mysql.com/doc/refman/5.5/en/server-system-vari...
Apparently, your Python script collects statistics for a long time, the muscle decides that it will not come and leaves :)
What can threaten - if there are many connections that do not close themselves, then over time, the muscle's connection pool may end.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question