|
|
|
|
|
by cpncrunch
4661 days ago
|
|
I can't really see how your code or queries could cause mysql or apache to gradually slow down and then speed up when you kill the processes. It sounds more like virtual memory of some process is growing too high causing thrashing, or apache has too many children, or you're running out of some resource, or something is leaking memory. Regarding apache/mysql: are you using stock distributions, or did you build them yourself? Are you using any unusual configuration in either of them? You say you kill both mysql and apache, but what happens if you just kill one or the other? I'm just wondering if it is some buggy cgi script that is leaking resources. |
|
Actually, we've ascertained that it is not the code or queries that cause this per se, but it is the traffic patterns - human visitors + SE crawlers... at times, there are (natural) traffic bursts and that's when the server starts choking.
apache/mysql - stock distros, with some config tweaks, mainly in my.cnf.
>what happens if you just kill one or the other?
Good call. Actually, restarting just apache does the trick most of the times. What we suspect is, abrupt flooding in http requests causes MySQL to slow down which causes http requests to get queued up and finally choke the service.