Help - Search - Members - Calendar
Full Version: Too many proccesses?
The Planet Forums > System Administration > Virtualization
kds2
I been having many problems keeping my server alive. Seems like I get different answers from ev1 on this issue all the time. Anyways, the last response was basically this:

This is occuring because you are running out of memory. You have almost 100 MySQL processes running and 60 or so Apache processes. There is no reason to have this many. I'm only seeing 2 connections to your apache server right now. Here are some good articles on optimizing apache and MySQL, I suggest following them.
http://rimuhosting.com/howto/memory.jsp
http://emergent.urbanpug.com/?p=60 = apache optimize
http://emergent.urbanpug.com/?p=61 = mysql
Once you've done this, you should no longer experience these errors. Have a nice day.

I’m still a rookie messing with this stuff. Why would I have too many processes? And is this expected from their standard configuration? How do I fix this? I’m a little lost here.
dalem
I would do what the sugested there are many threads in this forum for optimizing apache/mysql

"Why would I have too many processes?"
try to find the process thats causing it
kds2
Like I mentioned above, I’m a little lost. How do I find the processes that are causing it?
dalem
use the commands below in SSH

top
ps auxf
strace -p
lsof -p


apache/mysql threads
http://forums.ev1servers.net/showthread.php?t=2098
http://forum.ev1servers.net/showthread.php...=&threadid=9895
kds2
For top I got:
15:56:50 up 8 min, 1 user, load average: 0.00, 0.02, 0.01
55 processes: 54 sleeping, 1 running, 0 zombie, 0 stopped
CPU states: cpu user nice system irq softirq iowait idle
total 0.0% 0.0% 0.4% 0.0% 0.0% 0.0% 99.5%
cpu00 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% 100.0%
cpu01 0.4% 0.0% 0.9% 0.0% 0.0% 0.0% 98.5%
Mem: 1543016k av, 1287592k used, 255424k free, 0k shrd, 61676k buff
888724k active, 108424k inactive
Swap: 2048276k av, 411236k used, 1637040k free 329780k cached
Unknown command `~' -- hit `h' for help
PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND
1 root 16 0 1412 472 1260 S 0.0 0.0 0:00 0 init
9806 root 16 0 1468 540 1304 S 0.0 0.0 0:00 1 syslogd
9817 named 18 0 11568 2796 4616 S 0.0 0.1 0:00 0 named
9818 named 15 0 11568 2796 4616 S 0.0 0.1 0:00 0 named
9819 named 15 0 11568 2796 4616 S 0.0 0.1 0:00 1 named
9820 named 16 0 11568 2796 4616 S 0.0 0.1 0:00 0 named
9821 named 16 0 11568 2796 4616 S 0.0 0.1 0:00 0 named
9845 root 16 0 3516 1524 3296 S 0.0 0.0 0:00 1 sshd
9868 root 16 0 2012 876 1676 S 0.0 0.0 0:00 0 xinetd
9917 root 17 0 2064 1004 1880 S 0.0 0.0 0:00 0 safe_mysqld
9959 mysql 15 0 15440 2892 5028 S 0.0 0.1 0:00 1 mysqld
9989 qmails 16 0 1444 364 1268 S 0.0 0.0 0:00 1 qmail-send
9991 mysql 16 0 15440 2892 5028 S 0.0 0.1 0:00 1 mysqld
9992 mysql 16 0 15440 2892 5028 S 0.0 0.1 0:00 1 mysqld
9993 qmaill 16 0 1408 408 1240 S 0.0 0.0 0:00 0 splogger
9994 root 15 0 1412 324 1252 S 0.0 0.0 0:00 0 qmail-lspawn
9995 qmailr 15 0 1408 340 1248 S 0.0 0.0 0:00 0 qmail-rspawn
9996 qmailq 15 0 1404 308 1244 S 0.0 0.0 0:00 0 qmail-clean
10165 postgres 16 0 6688 1912 6096 S 0.0 0.1 0:00 1 postmaster
10167 postgres 18 0 7680 1892 6096 S 0.0 0.1 0:00 1 postmaster
10168 postgres 18 0 6688 1900 6096 S 0.0 0.1 0:00 1 postmaster
10184 root 18 0 23136 20M 3984 S 0.0 1.3 0:00 0 spamd
10211 popuser 25 0 23088 19M 3984 S 0.0 1.3 0:00 0 spamd
10226 popuser 25 0 23040 19M 3984 S 0.0 1.3 0:00 1 spamd
11274 root 16 0 20576 10M 16580 S 0.0 0.6 0:00 0 httpd
11321 root 16 0 13092 4984 11316 S 0.0 0.3 0:00 1 httpsd
11325 psaadm 21 0 13516 5952 11316 S 0.0 0.3 0:00 1 httpsd
11326 psaadm 16 0 13516 5952 11316 S 0.0 0.3 0:00 0 httpsd
11327 psaadm 16 0 13092 4988 11316 S 0.0 0.3 0:00 1 httpsd
11328 psaadm 16 0 13092 4988 11316 S 0.0 0.3 0:00 0 httpsd
11329 psaadm 16 0 13092 4988 11316 S 0.0 0.3 0:00 0 httpsd
11367 root 16 0 20652 10M 16524 S 0.0 0.6 0:00 0 httpd
11368 apache 16 0 20708 10M 16580 S 0.0 0.7 0:00 1 httpd
11369 apache 16 0 20708 10M 16580 S 0.0 0.7 0:00 1 httpd
11370 apache 16 0 20708 10M 16580 S 0.0 0.7 0:00 0 httpd


For ps auxf

-bash-2.05b$ ps auxf
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 1412 472 ? S 15:48 0:00 init
root 9806 0.0 0.0 1468 540 ? S 15:48 0:00 syslogd -m 0
named 9817 0.0 0.1 11568 2796 ? S 15:48 0:00 /usr/sbin/named -u named -c /etc/named.conf -u
named 9818 0.0 0.1 11568 2796 ? S 15:48 0:00 _ /usr/sbin/named -u named -c /etc/named.conf
named 9819 0.0 0.1 11568 2796 ? S 15:48 0:00 _ /usr/sbin/named -u named -c /etc/named.
named 9820 0.0 0.1 11568 2796 ? S 15:48 0:00 _ /usr/sbin/named -u named -c /etc/named.
named 9821 0.0 0.1 11568 2796 ? S 15:48 0:00 _ /usr/sbin/named -u named -c /etc/named.
root 9845 0.0 0.0 3516 1524 ? S 15:48 0:00 /usr/sbin/sshd
root 12111 0.0 0.1 6704 2016 ? S 15:58 0:00 _ sshd: admin [priv]
admin 12113 0.0 0.1 6848 2260 ? S 15:58 0:00 _ sshd: admin@pts/0
admin 12114 0.0 0.0 2068 1172 pts/0 S 15:58 0:00 _ -bash
admin 13599 0.0 0.0 2624 684 pts/0 R 16:00 0:00 _ ps auxf
root 9868 0.0 0.0 2012 876 ? S 15:48 0:00 xinetd -stayalive -pidfile /var/run/xinetd.pid
qmaild 12275 0.0 0.0 3140 776 ? S 15:59 0:00 _ /var/qmail/bin/qmail-smtpd /var/qmail/bin/s
root 13360 0.0 0.0 1484 448 ? S 15:59 0:00 _ tcp-env /var/qmail/bin/relaylock /var/qmail
root 9917 0.0 0.0 2064 1004 ? S 15:48 0:00 /bin/sh /usr/bin/safe_mysqld --defaults-file=/e
mysql 9959 0.0 0.1 15440 2892 ? S 15:48 0:00 _ /usr/libexec/mysqld --defaults-file=/etc/my
mysql 9991 0.0 0.1 15440 2892 ? S 15:48 0:00 _ /usr/libexec/mysqld --defaults-file=/et
mysql 9992 0.0 0.1 15440 2892 ? S 15:48 0:00 _ /usr/libexec/mysqld --defaults-file
qmails 9989 0.0 0.0 1444 364 ? S 15:48 0:00 qmail-send
qmaill 9993 0.0 0.0 1408 408 ? S 15:48 0:00 _ splogger qmail
root 9994 0.0 0.0 1412 324 ? S 15:48 0:00 _ qmail-lspawn ./Maildir/
qmailr 9995 0.0 0.0 1408 340 ? S 15:48 0:00 _ qmail-rspawn
qmailq 9996 0.0 0.0 1404 308 ? S 15:48 0:00 _ qmail-clean
postgres 10165 0.0 0.1 6688 1912 ? S 15:49 0:00 /usr/bin/postmaster -p 5432
postgres 10167 0.0 0.1 7680 1892 ? S 15:49 0:00 _ postgres: stats buffer process
postgres 10168 0.0 0.1 6688 1900 ? S 15:49 0:00 _ postgres: stats collector process
root 10184 0.0 1.3 23136 20800 ? S 15:49 0:00 /usr/bin/spamd -d -c -a -m5 -H
popuser 10211 0.0 1.3 23088 20456 ? S 15:49 0:00 /usr/bin/spamd --username=popuser --daemonize -
popuser 10226 0.0 1.3 23040 20456 ? S 15:49 0:00 /usr/bin/spamd --username=popuser --daemonize -
root 11274 0.0 0.6 20576 10752 ? S 15:49 0:00 /usr/sbin/httpd
root 11367 0.0 0.6 20652 10700 ? S 15:49 0:00 _ /usr/sbin/httpd
apache 11368 0.0 0.7 20708 10888 ? S 15:49 0:00 _ /usr/sbin/httpd
apache 11369 0.0 0.7 20708 10888 ? S 15:49 0:00 _ /usr/sbin/httpd
apache 11370 0.0 0.7 20708 10888 ? S 15:49 0:00 _ /usr/sbin/httpd
apache 11371 0.0 0.7 20708 10888 ? S 15:49 0:00 _ /usr/sbin/httpd
apache 11372 0.0 0.7 20708 10892 ? S 15:49 0:00 _ /usr/sbin/httpd
apache 11373 0.0 0.7 20708 10888 ? S 15:49 0:00 _ /usr/sbin/httpd
apache 11374 0.0 0.7 20708 10888 ? S 15:49 0:00 _ /usr/sbin/httpd
apache 11375 0.0 0.7 20708 10888 ? S 15:49 0:00 _ /usr/sbin/httpd
root 11321 0.0 0.3 13092 4984 ? S 15:49 0:00 /usr/local/psa/admin/bin/httpsd
psaadm 11325 0.0 0.3 13516 5952 ? S 15:49 0:00 _ /usr/local/psa/admin/bin/httpsd
psaadm 11326 0.0 0.3 13516 5952 ? S 15:49 0:00 _ /usr/local/psa/admin/bin/httpsd
psaadm 11327 0.0 0.3 13092 4988 ? S 15:49 0:00 _ /usr/local/psa/admin/bin/httpsd
psaadm 11328 0.0 0.3 13092 4988 ? S 15:49 0:00 _ /usr/local/psa/admin/bin/httpsd
psaadm 11329 0.0 0.3 13092 4988 ? S 15:49 0:00 _ /usr/local/psa/admin/bin/httpsd
drweb 11392 0.0 0.5 10004 7752 ? S 15:49 0:00 /opt/drweb/drwebd
root 11471 0.0 0.0 1480 588 ? S 15:49 0:00 crond
mailman 11487 0.0 0.3 7364 4704 ? S 15:49 0:00 /usr/bin/python /var/mailman/bin/mailmanctl -s
mailman 11495 0.0 0.3 7384 4728 ? S 15:49 0:00 _ /usr/bin/python /var/mailman/bin/qrunner --
mailman 11496 0.0 0.3 7332 4728 ? S 15:49 0:00 _ /usr/bin/python /var/mailman/bin/qrunner --
mailman 11497 0.0 0.3 7336 4732 ? S 15:49 0:00 _ /usr/bin/python /var/mailman/bin/qrunner --
mailman 11498 0.0 0.3 7332 4728 ? S 15:49 0:00 _ /usr/bin/python /var/mailman/bin/qrunner --
mailman 11499 0.0 0.3 7424 4764 ? S 15:49 0:00 _ /usr/bin/python /var/mailman/bin/qrunner --
mailman 11500 0.0 0.3 7472 4796 ? S 15:49 0:00 _ /usr/bin/python /var/mailman/bin/qrunner --
mailman 11501 0.0 0.3 7380 4720 ? S 15:49 0:00 _ /usr/bin/python /var/mailman/bin/qrunner --
mailman 11504 0.0 0.3 7384 4728 ? S 15:49 0:00 _ /usr/bin/python /var/mailman/bin/qrunner --
-bash-2.05b$


And the last two

-bash-2.05b$ strace -p
-bash: syntax error near unexpected token `newline'

-bash-2.05b$ lsof -p
-bash: syntax error near unexpected token `newline'

Anyone see anything?
Gary Simat
you would want to edit your my.cnf to use less ram and such, also edit your httpd.conf to handle less clients and less instances. also disable drweb as it is a big resource hog.
dalem
from what you posted it looks ok your load is next to nothing processes at 55

the command would be strace -p 11369 (the pid of the the resouse hogging process)

same with lsof

I would asume your server was running fine at the time you ran the 2 commands run them when you are having issues
edweb
Hi, dear friends customers!

I have a great problem:

1 - My server down many times, because number processes it exceeded (black zone in Qos).

OBS: It always falls in dawn. Between 2:00am ans 5:am

I changed the httpd.conf with Swsoft instructions, see below:

KeepAlive Off
KeepAliveTimeout 15
< IfModule prefork.c>
StartServers 8
MinSpareServers 5
MaxSpareServers 10
ServerLimit 256
MaxClients 256
MaxRequestsPerChild 4000
< /IfModule>

Is correct ?

Please, helpe me urgent!!!

Thanks
dalem
QUOTE
[Between 2:00am ans 5:am

I would check what's running in your cron if it does it at the same time every day
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.