Knowledge base - Posts tagged with: mysql
"If it does not scale, it is broken by design"
Today a server of a customer with fantastic uptime suddenly lost its MySQL process while the customer was in the middle of a minor tweak of the WordPress platform.
Investigation revealed that the InnoDB storage engine was not able to allocate memory pages for a routine operation and in its most bizarre way of handling errors did a safe crash of the MySQL server ( No, there is no such thing as a "safe" crash, so please dear MySQL folks add sane error handling or stop pretending you are an "industrial" strength SQL server!)
Further conversation with the customer revealed that the developer, following an example in PHP Manual, decided it was a good idea to do this:
MySQL: Fix bad connection error defaults
For whatever reason MySQL server software ships with really stupid defaults for handling problems with the incoming connections. Obviously, Zubrcom's intallation of MySQL does not suffer from this problem. However, if you have braved rolling your own installation it may be helpful to add the following lines in /etc/my.cnf:
[mysqld]
max_connections = 1100 # max number of clients if each client is non-threaded
max_connect_errors=99999999 # dont stop mysql before it gets this many connection errors.
max_user_connections = 1100 # max connections per user
If MySQL is already running, login into root account and use comand SET GLOBAL to change the variable setting without restarting MySQL.

