1 |
>> I ran into an out of memory problem. The first mention of it in the |
2 |
>> kernel log is "mysqld invoked oom-killer". I haven't run into this |
3 |
>> before. I do have a swap partition but I don't activate it based on |
4 |
>> something I read previously that I later found out was wrong so I |
5 |
>> suppose I should activate it. Is fstab the way to do that? I have a |
6 |
>> commented line in there for swap. |
7 |
... |
8 |
> If you're running any other servers that utilize MySQL like Apache or |
9 |
> something, check its access logs to see if you had an abnormal number |
10 |
> of connections. Bruteforce hacking or some kind of flooding/DOS attack |
11 |
> might cause it to use more memory than it ordinarily would. |
12 |
|
13 |
I don't know why I didn't check the apache2 error log before, but I |
14 |
got the following entry 2 seconds before the server became |
15 |
unresponsive: |
16 |
|
17 |
[error] server reached MaxClients setting, consider raising the |
18 |
MaxClients setting |
19 |
|
20 |
I use the default 256 for MaxClients. This confirms the server was |
21 |
brought down by too many child processes consuming too much memory. |
22 |
Looking back at the access_log, it's clear this condition was caused |
23 |
by the single IP which requested one of my pages about 300 times over |
24 |
the course of 1 minute. This caused my entire server to lock up for |
25 |
hours until I rebooted it. |
26 |
|
27 |
I hesitate to reduce MaxClients from 256. I think my server should be |
28 |
able to handle it since it's the default. So I need to prevent my |
29 |
apache2 child processes from consuming so much memory? apache2 was |
30 |
restarted about an hour before the lockup so it had a pretty fresh |
31 |
start. I do use mod_perl which is a memory hog from what I |
32 |
understand. Do I just need more RAM? |
33 |
|
34 |
- Grant |