Server load issues
Robby Russell <robby-/[email protected]>
| Newsgroups | gmane.comp.web.fastcgi.devel |
|---|---|
| Organization | PLANET ARGON |
| Message-ID | <1115872052.4541.9.camel@linus> |
I have FastCGI running on a server for some ruby applications. Over the past week, the load on this server will start to slowly climb and suck up all the swap/ram... until it has to be rebooted. Here is the basic configuration that I have for mod_fastcgi: > <IfModule mod_fastcgi.c> > FastCgiIpcDir /tmp/fcgi_ipc/ > AddHandler fastcgi-script .fcgi > FastCgiConfig -maxClassProcesses 10 -maxProcesses 40 -killInterval 100 -idle-timeout 120 -pass-header HTTP_AUTHORIZATION -autoUpdate > </IfModule> > What sort of measures can I take to prevent things like this? I can work on having the processes watched by an external monitoring program, but am curious as to how I can better optimize FastCGI to prevent this from happening. For an example...when I looked at top, I saw this: > 21:02:31 up 1 day, 13:57, 7 users, load average: 326.86, 323.58, 318.40 > 1027400k used, 5380k free, 0k shrd, 3988k buff > 346252k active, 599152k inactive > Swap: 1052248k av, 1052248k used, 0k free 35628k cached > > PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND > 10478 root 16 0 8472 1612 1584 S 11.7 0.1 25:31 0 httpd > 5 root 18 0 0 0 0 RW 11.3 0.0 14:33 0 kswapd > 10610 apache 16 0 112M 107M 1492 D 6.0 10.6 6:34 0 dispatch.fcgi > 10604 apache 15 0 194M 178M 1500 S 4.8 17.7 31:28 0 dispatch.fcgi > 22702 apache 15 0 51796 39M 1516 S 2.7 3.9 5:58 0 dispatch.fcgi > 19409 spamd 16 0 31100 20M 4744 D 2.0 1.9 2:48 0 spamd > 10662 matchboy 17 0 6588 6372 5024 D 0.9 0.6 2:30 0 postmaster > 10691 matchboy 15 0 6176 5924 4660 S 0.7 0.5 3:04 0 postmaster > 10033 matchboy 15 0 1816 1788 704 R 0.6 0.1 18:18 0 top > 8521 mailman 16 0 4580 2216 1196 D 0.6 0.2 0:56 0 python > 4221 apache 21 0 17968 6620 1456 R 0.6 0.6 0:43 0 dispatch.fcgi > 15773 spamd 19 0 26836 3276 1648 R 0.6 0.3 1:01 0 spamd > 20980 rails1 19 0 18676 14M 1444 R 0.6 1.3 0:42 0 dispatch.fcgi > 8522 mailman 16 0 4388 1972 1116 D 0.5 0.1 1:03 0 python > 28368 rails1 24 0 17244 6232 1400 R 0.5 0.6 0:51 0 dispatch.fcgi > 28376 rails1 24 0 18452 6208 1444 R 0.5 0.6 0:51 0 dispatch.fcgi > 28407 rails1 20 0 17220 6304 1396 R 0.5 0.6 0:46 0 dispatch.fcgi > 7169 rails1 21 0 17264 6880 1432 R 0.5 0.6 0:53 0 dispatch.fcgi > 7430 apache 19 0 18180 12M 1444 R 0.5 1.2 0:43 0 dispatch.fcgi > 7476 apache 20 0 19724 13M 1444 R 0.5 1.3 0:36 0 dispatch.fcgi > 20984 apache 18 0 16896 11M 1400 R 0.5 1.1 0:43 0 dispatch.fcgi > 11316 spamd 20 0 24204 2940 2212 R 0.5 0.2 0:20 0 spamd > 789 root 15 0 572 552 488 R 0.4 0.0 7:52 0 syslogd > 8516 mailman 16 0 4736 2228 1148 D 0.4 0.2 0:33 0 python > 22712 curthibb 16 0 6120 5900 4512 D 0.4 0.5 0:42 0 postmaster > 7191 rails1 19 0 17140 2040 1384 R 0.4 0.1 0:53 0 dispatch.fcgi > 7489 apache 24 0 18468 13M 1448 R 0.4 1.2 0:42 0 dispatch.fcgi > 7502 apache 24 0 18084 14M 1444 R 0.4 1.4 0:45 0 dispatch.fcgi > 20968 rails1 21 0 17820 12M 1428 R 0.4 1.2 0:42 0 dispatch.fcgi > 21001 apache 18 0 16964 10M 1440 D 0.4 1.0 0:42 0 dispatch.fcgi > 10321 seventy2 18 0 4004 3836 3040 D 0.4 0.3 0:24 0 postmaster > 10891 nobhillb 18 0 4148 3864 2680 R 0.4 0.3 0:11 0 java > 10934 nobhillb 19 0 4132 3896 2668 R 0.4 0.3 0:12 0 java > 11001 root 24 0 4356 3712 296 R 0.4 0.3 0:12 0 pidof > 1009 mysql 16 0 31324 4252 1768 S 0.3 0.4 64:09 0 mysqld-max > 8517 mailman 16 0 4352 2256 1120 D 0.3 0.2 0:28 0 python > 19498 vpopmail 16 0 1528 1432 656 D 0.3 0.1 0:34 0 imapd > 29921 rails1 17 0 18488 6788 1464 S 0.3 0.6 0:50 0 dispatch.fcgi > 739 rails1 21 0 17164 5276 1392 R 0.3 0.5 0:49 0 dispatch.fcgi > 7445 apache 18 0 17096 11M 1400 R 0.3 1.1 0:34 0 dispatch.fcgi > 21161 seventy2 19 0 3148 2864 2260 R 0.3 0.2 0:30 0 postmaster > 10539 root 21 0 4892 4480 1404 R 0.3 0.4 0:13 0 mrtg > 10796 root 18 0 4912 2884 1404 R 0.3 0.2 0:09 0 mrtg > 10935 johnbenz 18 0 2232 2016 1624 R 0.3 0.1 0:15 0 postmaster Thanks, Robby -- /****************************************************** * Robby Russell, Owner.Developer.Geek * PLANET ARGON, Open Source Solutions & Web Hosting * Portland, Oregon | p: 503.351.4730 | f: 815.642.4068 * www.planetargon.com | www.robbyonrails.com *******************************************************/ ___________________________________ fastcgi-developers mailing list http://fastcgi.com/fastcgi-developers/