So, our site runs WordPress and in the past few days we have been getting tons of spam comments etc. I believe that we are becoming the victims of some kind of bot army that has been crashing our server a lot in the past few days and I really need help.
I have called our tech support and they have recommended decreasing some of the buffer sizes in my.cnf
and lowering max_connections
. I ran the mysqltuner
script and here are the results.
The immediate problem is that we are reaching our max_connections
value. I don't want to increase it beyond 40
because when I do MySQL uses the full capacity of the server's memory and starts to have memory allocation errors when I'm running terminal commands. The real issue is what do I need to tweak so that I can increase the max_connections without allowing MySQL to use more memory? I think the buffer pool size is a big factor but I don't know how to tweak it properly.
Also, mysqltuner says I have a bunch of fragmented tables but I just went through by hand yesterday and ran OPTIMIZE TABLE
on all of the tables?? Could that be a result of running mysqlcheck --repair --all-databases
??