LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-02-2009, 03:24 PM   #1
Stephan_Craft
Member
 
Registered: Jul 2008
Posts: 184

Rep: Reputation: 30
lots of sleeping connections!


I’m using centos 5.2 and for the first time i notice that almost all my connections is sleeping!

PHP Code:
Tasks357 total,   4 running353 sleeping,   0 stopped,   0 zombie 
in my.cnf i have this
PHP Code:
set-variable max_connections=1000
max_connections
=1000

interactive_timeout
=4
wait_timeout
=15
connect_timeout
=
in php.ini i disabled all persisting connection also!

what's wrong with my server?
 
Old 04-02-2009, 04:10 PM   #2
sleddog
Member
 
Registered: Jan 2002
Location: Labrador, Canada
Distribution: CentOS, Debian
Posts: 182

Rep: Reputation: 35
'Sleeping processes' (not connections) doesn't mean there's something wrong. Those are processes waiting to do something.

Are there too many? Maybe. Depends on what you're server is set up to do.

If you provide more information, such as the output from "ps aux", we can see what those processes are, and maybe decide if you need that many.

By the way, 1,000 MySQL connections is a LOT. Unless your MySQL server is hugely busy and has a very large amount of RAM, you might think about adjusting that down. But again, it depends on what your server is intended to do....
 
Old 04-02-2009, 05:46 PM   #3
Stephan_Craft
Member
 
Registered: Jul 2008
Posts: 184

Original Poster
Rep: Reputation: 30
I have 10gb of ram… but if reducing max_connection can save me ram, why not. I always thought that if you are not using the all 1000 it won’t affect the system resource.
I put 300 now.

The reason I checked my top status anyway, is that my server stop working each day for 5 minutes - At this time(when it stuck for 5 min) my top shows Tasks: 599 total, no apache in the list below, only mysqld and some system programmers I can’t remember right now…


ps aux
PHP Code:
root       133  0.0  0.0      0     0 ?        S<   Mar30   0:01 [kblockd/1]
root       134  0.0  0.0      0     0 ?        S<   Mar30   0:00 [kblockd/2]
root       135  0.0  0.0      0     0 ?        S<   Mar30   0:00 [kblockd/3]
root       136  0.0  0.0      0     0 ?        S<   Mar30   0:00 [kblockd/4]
root       137  0.0  0.0      0     0 ?        S<   Mar30   0:00 [kblockd/5]
root       138  0.0  0.0      0     0 ?        S<   Mar30   0:00 [kblockd/6]
root       139  0.0  0.0      0     0 ?        S<   Mar30   0:00 [kblockd/7]
root       140  0.0  0.0      0     0 ?        S<   Mar30   0:00 [kacpid]
root       251  0.0  0.0      0     0 ?        S<   Mar30   0:00 [cqueue/0]
root       252  0.0  0.0      0     0 ?        S<   Mar30   0:00 [cqueue/1]
root       253  0.0  0.0      0     0 ?        S<   Mar30   0:00 [cqueue/2]
root       254  0.0  0.0      0     0 ?        S<   Mar30   0:00 [cqueue/3]
root       255  0.0  0.0      0     0 ?        S<   Mar30   0:00 [cqueue/4]
root       256  0.0  0.0      0     0 ?        S<   Mar30   0:00 [cqueue/5]
root       257  0.0  0.0      0     0 ?        S<   Mar30   0:00 [cqueue/6]
root       258  0.0  0.0      0     0 ?        S<   Mar30   0:00 [cqueue/7]
root       261  0.0  0.0      0     0 ?        S<   Mar30   0:00 [khubd]
root       263  0.0  0.0      0     0 ?        S<   Mar30   0:00 [kseriod]
root       380  0.0  0.0      0     0 ?        S<   Mar30   2:49 [kswapd0]
root       381  0.0  0.0      0     0 ?        S<   Mar30   0:00 [aio/0]
root       382  0.0  0.0      0     0 ?        S<   Mar30   0:00 [aio/1]
root       383  0.0  0.0      0     0 ?        S<   Mar30   0:00 [aio/2]
root       384  0.0  0.0      0     0 ?        S<   Mar30   0:00 [aio/3]
root       385  0.0  0.0      0     0 ?        S<   Mar30   0:00 [aio/4]
root       386  0.0  0.0      0     0 ?        S<   Mar30   0:00 [aio/5]
root       387  0.0  0.0      0     0 ?        S<   Mar30   0:00 [aio/6]
root       388  0.0  0.0      0     0 ?        S<   Mar30   0:00 [aio/7]
root       551  0.0  0.0      0     0 ?        S<   Mar30   0:00 [kpsmoused]
root       630  0.0  0.0      0     0 ?        S<   Mar30   0:00 [scsi_eh_0]
root       640  0.0  0.0      0     0 ?        S<   Mar30   0:00 [ata/0]
root       641  0.0  0.0      0     0 ?        S<   Mar30   0:00 [ata/1]
root       642  0.0  0.0      0     0 ?        S<   Mar30   0:00 [ata/2]
root       643  0.0  0.0      0     0 ?        S<   Mar30   0:00 [ata/3]
root       644  0.0  0.0      0     0 ?        S<   Mar30   0:00 [ata/4]
root       645  0.0  0.0      0     0 ?        S<   Mar30   0:00 [ata/5]
root       646  0.0  0.0      0     0 ?        S<   Mar30   0:00 [ata/6]
root       647  0.0  0.0      0     0 ?        S<   Mar30   0:00 [ata/7]
root       648  0.0  0.0      0     0 ?        S<   Mar30   0:00 [ata_aux]
root       658  0.0  0.0      0     0 ?        S<   Mar30   0:00 [scsi_eh_1]
root       659  0.0  0.0      0     0 ?        S<   Mar30   0:00 [scsi_eh_2]
root       696  0.0  0.0      0     0 ?        S<   Mar30   0:00 [ksnapd]
root       699  0.1  0.0      0     0 ?        S<   Mar30   7:49 [kjournald]
root       726  0.0  0.0      0     0 ?        S<   Mar30   0:00 [kauditd]
root       760  0.0  0.0  12632   344 ?        S<s  Mar30   0:00 /sbin/udevd -d
root      1453  0.0  0.0      0     0 
?        S<   Mar30   0:00 [kedac]
root      2124  0.0  0.0      0     0 ?        S<   Mar30   0:00 [kmpathd/0]
root      2125  0.0  0.0      0     0 ?        S<   Mar30   0:00 [kmpathd/1]
root      2126  0.0  0.0      0     0 ?        S<   Mar30   0:00 [kmpathd/2]
root      2127  0.0  0.0      0     0 ?        S<   Mar30   0:00 [kmpathd/3]
root      2128  0.0  0.0      0     0 ?        S<   Mar30   0:00 [kmpathd/4]
root      2129  0.0  0.0      0     0 ?        S<   Mar30   0:00 [kmpathd/5]
root      2130  0.0  0.0      0     0 ?        S<   Mar30   0:00 [kmpathd/6]
root      2131  0.0  0.0      0     0 ?        S<   Mar30   0:00 [kmpathd/7]
root      2155  0.0  0.0      0     0 ?        S<   Mar30   0:00 [kjournald]
root      2767  0.0  0.0  83892   608 ?        S<sl Mar30   0:00 auditd
root      2769  0.0  0.0  81768   628 
?        S<sl Mar30   0:00 /sbin/audispd
root      2820  0.0  0.0   5892   512 
?        Ss   Mar30   0:00 syslogd -m 0
root      2823  0.0  0.0   3788   396 
?        Ss   Mar30   0:00 klogd -x
root      2839  0.0  0.0  10712   296 
?        Ss   Mar30   0:02 irqbalance
rpc       2873  0.0  0.0   8036   472 
?        Ss   Mar30   0:00 portmap
rpcuser   2898  0.0  0.0  10128   676 
?        Ss   Mar30   0:00 rpc.statd
root      2949  0.0  0.0  42052   284 
?        Ss   Mar30   0:00 rpc.idmapd
dbus      2976  0.0  0.0  21252   680 
?        Ss   Mar30   0:00 dbus-daemon --system
root      2991  0.0  0.0  10400   508 
?        Ss   Mar30   0:00 /usr/sbin/hcid
root      2997  0.0  0.0   5916   372 
?        Ss   Mar30   0:00 /usr/sbin/sdpd
root      3039  0.0  0.0      0     0 
?        S<   Mar30   0:00 [krfcommd]
root      3086  0.0  0.0  21020   576 ?        Ssl  Mar30   0:07 pcscd
root      3114  0.0  0.0   8500   352 
?        Ss   Mar30   0:00 /usr/bin/hidd --server
root      3140  0.0  0.0 106472  1000 
?        Ssl  Mar30   0:02 automount
root      3163  0.0  0.0   3784   412 
?        Ss   Mar30   0:00 /usr/sbin/acpid
root      3178  0.0  0.0   6060   488 
?        Ss   Mar30   0:00 dovecot
root      3184  0.0  0.0  10896  1008 
?        S    Mar30   0:00 dovecot-auth
root      3229  0.0  0.0  59368   716 
?        Ss   Mar30   0:00 /usr/sbin/sshd
root      3244  0.0  0.0 126888   760 
?        Ss   Mar30   0:00 cupsd
root      3275  0.0  0.0  21628   524 
?        Ss   Mar30   0:00 xinetd -stayalive -pidfile /var/run/xinetd.pid
dovecot   3323  0.0  0.0  27972  1488 
?        S    Mar30   0:00 pop3-login
dovecot   3324  0.0  0.0  27972  1488 
?        S    Mar30   0:00 pop3-login
dovecot   3325  0.0  0.0  27972  1488 
?        S    Mar30   0:00 pop3-login
dovecot   3326  0.0  0.0  27968  1484 
?        S    Mar30   0:00 pop3-login
dovecot   3328  0.0  0.0  27972  1444 
?        S    Mar30   0:00 pop3-login
dovecot   3329  0.0  0.0  27972  1488 
?        S    Mar30   0:00 pop3-login
dovecot   3330  0.0  0.0  27968  1488 
?        S    Mar30   0:00 pop3-login
dovecot   3335  0.0  0.0  27968  1488 
?        S    Mar30   0:00 pop3-login
dovecot   3336  0.0  0.0  27972  1488 
?        S    Mar30   0:00 pop3-login
dovecot   3337  0.0  0.0  27968  1484 
?        S    Mar30   0:00 pop3-login
dovecot   3338  0.0  0.0  27980  1488 
?        S    Mar30   0:00 imap-login
dovecot   3339  0.0  0.0  27116  1436 
?        S    Mar30   0:00 imap-login
dovecot   3340  0.0  0.0  27980  1488 
?        S    Mar30   0:00 imap-login
dovecot   3341  0.0  0.0  27980  1488 
?        S    Mar30   0:00 imap-login
dovecot   3343  0.0  0.0  27976  1488 
?        S    Mar30   0:00 imap-login
dovecot   3344  0.0  0.0  27980  1488 
?        S    Mar30   0:00 imap-login
dovecot   3345  0.0  0.0  27980  1488 
?        S    Mar30   0:00 imap-login
dovecot   3346  0.0  0.0  27120  1436 
?        S    Mar30   0:00 imap-login
dovecot   3348  0.0  0.0  27980  1436 
?        S    Mar30   0:00 imap-login
dovecot   3350  0.0  0.0  27976  1488 
?        S    Mar30   0:00 imap-login
dovecot   3351  0.0  0.0  27980  1436 
?        S    Mar30   0:00 imap-login
dovecot   3352  0.0  0.0  27120  1484 
?        S    Mar30   0:00 imap-login
root      3427  0.0  0.0   1224   172 
?        Ss   Mar30   0:00 /usr/local/directadmin/da-popb4smtp
nobody    3442  0.0  0.0  45228   768 
?        Ss   Mar30   0:00 /usr/local/directadmin/directadmin d
mail      3456  0.0  0.0  47924   752 
?        Ss   Mar30   0:00 /usr/sbin/exim -bd -q15m -oP /var/run/exim.pid
root      3480  0.0  0.0   6432   276 
?        Ss   Mar30   0:00 gpm -/dev/input/mice -t exps2
ftp       3510  0.0  0.0   8784   480 
?        Ss   Mar30   0:00 proftpd: (accepting connections)
root      3525  0.0  0.0  74808   620 ?        Ss   Mar30   0:00 crond
root      3554  0.0  0.0  18704   344 
?        Ss   Mar30   0:00 /usr/sbin/atd
avahi     3584  0.0  0.0  24136   856 
?        Ss   Mar30   0:00 avahi-daemonrunning [server2.local]
avahi     3585  0.0  0.0  23112   144 ?        Ss   Mar30   0:00 avahi-daemonchroot helper
68        3600  0.0  0.0  30832  1420 
?        Ss   Mar30   0:00 hald
root      3601  0.0  0.0  21648   680 
?        S    Mar30   0:00 hald-runner
68        3608  0.0  0.0  12288   624 
?        S    Mar30   0:00 hald-addon-acpilistening on acpid socket /var/run/acpid.socket
root      3616  0.0  0.0  10196   504 
?        S    Mar30   0:24 hald-addon-storagepolling /dev/hda
root      3625  0.0  0.0 242772  4572 
?        SN   Mar30   0:02 /usr/bin/python -tt /usr/sbin/yum-updatesd
root      3627  0.0  0.0  16192  4104 
?        SN   Mar30   0:01 /usr/libexec/gam_server
apache    4355  1.6  0.2 1125568 25524 
?       S    01:24   0:11 /usr/sbin/httpd -k start -DSSL
apache    4408  1.9  0.1 1176432 20180 
?       S    01:25   0:11 /usr/sbin/httpd -k start -DSSL
apache    4507  2.2  0.2 1123216 22192 
?       S    01:27   0:10 /usr/sbin/httpd -k start -DSSL
apache    4536  1.8  0.3 1132656 32332 
?       S    01:28   0:07 /usr/sbin/httpd -k start -DSSL
root      4581  0.0  0.0  65284   208 
?        Ss   Mar30   0:00 rpc.rquotad
root      4635  0.0  0.0      0     0 
?        S<   Mar30   0:00 [nfsd4]
root      4733  0.0  0.0      0     0 ?        S    Mar30   0:00 [lockd]
root      4734  0.0  0.0      0     0 ?        S<   Mar30   0:02 [rpciod/0]
root      4735  0.0  0.0      0     0 ?        S<   Mar30   0:00 [rpciod/1]
root      4736  0.0  0.0      0     0 ?        S<   Mar30   0:00 [rpciod/2]
root      4737  0.0  0.0      0     0 ?        S<   Mar30   0:00 [rpciod/3]
root      4738  0.0  0.0      0     0 ?        S<   Mar30   0:00 [rpciod/4]
root      4739  0.0  0.0      0     0 ?        S<   Mar30   0:00 [rpciod/5]
root      4740  0.0  0.0      0     0 ?        S<   Mar30   0:00 [rpciod/6]
root      4741  0.0  0.0      0     0 ?        S<   Mar30   0:00 [rpciod/7]
root      4742  0.0  0.0      0     0 ?        S    Mar30   0:00 [nfsd]
root      4743  0.0  0.0      0     0 ?        S    Mar30   0:00 [nfsd]
root      4744  0.0  0.0      0     0 ?        S    Mar30   0:00 [nfsd]
root      4745  0.0  0.0      0     0 ?        S    Mar30   0:00 [nfsd]
root      4746  0.0  0.0      0     0 ?        S    Mar30   0:00 [nfsd]
root      4747  0.0  0.0      0     0 ?        S    Mar30   0:00 [nfsd]
root      4748  0.0  0.0      0     0 ?        S    Mar30   0:00 [nfsd]
root      4749  0.0  0.0      0     0 ?        S    Mar30   0:00 [nfsd]
root      4754  0.0  0.0  10184   300 ?        Ss   Mar30   0:00 rpc.mountd
root      4831 74.7  0.8 106752 87108 
?        Ss   Mar30 3351:42 ./xbt_tracker
apache    4835  1.7  0.3 1131596 31732 
?       R    01:29   0:06 /usr/sbin/httpd -k start -DSSL
apache    4853  1.5  0.1 1121284 19540 
?       S    01:29   0:05 /usr/sbin/httpd -k start -DSSL
apache    4873  1.4  0.1 1121560 19236 
?       S    01:29   0:05 /usr/sbin/httpd -k start -DSSL
apache    4921  1.8  0.2 1125568 24092 
?       S    01:31   0:04 /usr/sbin/httpd -k start -DSSL
apache    4925  1.5  0.2 1123200 20548 
?       S    01:31   0:04 /usr/sbin/httpd -k start -DSSL
root      4957  0.0  0.0   4060   256 
?        S    Mar30   0:00 /usr/sbin/smartd -q never
root      4961  0.0  0.0   3772   348 tty1     Ss
+  Mar30   0:00 /sbin/mingetty tty1
root      4962  0.0  0.0   3772   348 tty2     Ss
+  Mar30   0:00 /sbin/mingetty tty2
root      4963  0.0  0.0   3776   348 tty3     Ss
+  Mar30   0:00 /sbin/mingetty tty3
root      4964  0.0  0.0   3776   348 tty4     Ss
+  Mar30   0:00 /sbin/mingetty tty4
root      4965  0.0  0.0   3776   348 tty5     Ss
+  Mar30   0:00 /sbin/mingetty tty5
root      4966  0.0  0.0   3776   348 tty6     Ss
+  Mar30   0:00 /sbin/mingetty tty6
apache    4968  1.8  0.2 1178748 23724 
?       S    01:32   0:04 /usr/sbin/httpd -k start -DSSL
apache    4975  1.8  0.1 1119124 18888 
?       S    01:32   0:04 /usr/sbin/httpd -k start -DSSL
apache    4976  1.5  0.2 1124856 23616 
?       S    01:32   0:03 /usr/sbin/httpd -k start -DSSL
apache    4977  1.4  0.2 1123740 22724 
?       S    01:32   0:03 /usr/sbin/httpd -k start -DSSL
apache    4989  1.5  0.2 1119508 20596 
?       S    01:32   0:03 /usr/sbin/httpd -k start -DSSL
apache    4993  1.0  0.1 1120984 17908 
?       S    01:32   0:02 /usr/sbin/httpd -k start -DSSL
apache    4994  1.6  0.2 1180788 23136 
?       S    01:32   0:03 /usr/sbin/httpd -k start -DSSL
apache    4997  1.4  0.2 1125200 21764 
?       S    01:32   0:02 /usr/sbin/httpd -k start -DSSL
apache    5006  1.7  0.2 1125156 22272 
?       S    01:32   0:03 /usr/sbin/httpd -k start -DSSL
apache    5007  1.7  0.3 1134804 31404 
?       S    01:32   0:03 /usr/sbin/httpd -k start -DSSL
apache    5008  1.2  0.2 1123108 22384 
?       S    01:32   0:02 /usr/sbin/httpd -k start -DSSL
apache    5009  1.2  0.2 1180432 23180 
?       S    01:32   0:02 /usr/sbin/httpd -k start -DSSL
apache    5014  2.0  0.1 1121332 18464 
?       S    01:33   0:03 /usr/sbin/httpd -k start -DSSL
apache    5015  1.5  0.2 1125560 22480 
?       S    01:33   0:02 /usr/sbin/httpd -k start -DSSL
apache    5016  1.2  0.2 1126456 23136 
?       S    01:33   0:01 /usr/sbin/httpd -k start -DSSL
apache    5017  1.6  0.1 1120984 17452 
?       S    01:33   0:02 /usr/sbin/httpd -k start -DSSL
apache    5036  1.6  0.2 1132728 30188 
?       S    01:33   0:02 /usr/sbin/httpd -k start -DSSL
apache    5040  1.1  0.1 1174436 18436 
?       S    01:33   0:01 /usr/sbin/httpd -k start -DSSL
apache    5045  1.1  0.3 1188940 32376 
?       S    01:33   0:01 /usr/sbin/httpd -k start -DSSL
apache    5046  1.3  0.2 1123472 23344 
?       S    01:33   0:01 /usr/sbin/httpd -k start -DSSL
apache    5047  1.4  0.2 1125560 21980 
?       S    01:33   0:02 /usr/sbin/httpd -k start -DSSL
apache    5048  1.2  0.3 1132876 31432 
?       S    01:33   0:01 /usr/sbin/httpd -k start -DSSL
apache    5049  1.0  0.2 1125192 22708 
?       S    01:33   0:01 /usr/sbin/httpd -k start -DSSL
apache    5055  0.8  0.2 1123164 20740 
?       S    01:33   0:01 /usr/sbin/httpd -k start -DSSL
apache    5057  1.4  0.2 1123156 21316 
?       S    01:33   0:02 /usr/sbin/httpd -k start -DSSL
apache    5063  1.7  0.2 1131556 30364 
?       R    01:33   0:02 /usr/sbin/httpd -k start -DSSL
apache    5064  1.1  0.2 1124612 22764 
?       S    01:33   0:01 /usr/sbin/httpd -k start -DSSL
apache    5065  0.8  0.2 1180456 21688 
?       S    01:33   0:01 /usr/sbin/httpd -k start -DSSL
apache    5067  1.5  0.1 1123076 19208 
?       S    01:33   0:02 /usr/sbin/httpd -k start -DSSL
apache    5069  1.6  0.2 1125216 22436 
?       S    01:33   0:02 /usr/sbin/httpd -k start -DSSL
apache    5071  1.6  0.2 1124380 22208 
?       S    01:34   0:01 /usr/sbin/httpd -k start -DSSL
apache    5163  1.2  0.1 1121424 19256 
?       R    01:34   0:01 /usr/sbin/httpd -k start -DSSL
apache    5176  0.8  0.2 1123728 22240 
?       S    01:34   0:00 /usr/sbin/httpd -k start -DSSL
apache    5190  1.1  0.2 1134672 30292 
?       S    01:34   0:01 /usr/sbin/httpd -k start -DSSL
apache    5192  0.9  0.1 1118908 15096 
?       S    01:34   0:00 /usr/sbin/httpd -k start -DSSL
apache    5209  1.1  0.1 1118908 16732 
?       S    01:34   0:01 /usr/sbin/httpd -k start -DSSL
apache    5211  1.5  0.1 1123500 19888 
?       S    01:34   0:01 /usr/sbin/httpd -k start -DSSL
apache    5214  0.7  0.2 1126024 23396 
?       S    01:34   0:00 /usr/sbin/httpd -k start -DSSL
apache    5215  1.4  0.2 1124372 22196 
?       S    01:34   0:01 /usr/sbin/httpd -k start -DSSL
apache    5216  1.0  0.2 1123092 21412 
?       S    01:34   0:00 /usr/sbin/httpd -k start -DSSL
apache    5224  1.6  0.1 1121368 20456 
?       S    01:34   0:01 /usr/sbin/httpd -k start -DSSL
apache    5233  2.1  0.1 1118708 15148 
?       S    01:34   0:02 /usr/sbin/httpd -k start -DSSL
apache    5236  1.0  0.1 1125568 20168 
?       S    01:34   0:00 /usr/sbin/httpd -k start -DSSL
apache    5238  1.1  0.2 1123472 23488 
?       S    01:34   0:01 /usr/sbin/httpd -k start -DSSL
apache    5241  1.2  0.2 1123108 20516 
?       S    01:34   0:01 /usr/sbin/httpd -k start -DSSL
apache    5242  1.2  0.2 1125592 21980 
?       S    01:34   0:01 /usr/sbin/httpd -k start -DSSL
apache    5243  1.6  0.2 1123492 21464 
?       S    01:34   0:01 /usr/sbin/httpd -k start -DSSL
apache    5244  1.6  0.1 1118932 15356 
?       S    01:34   0:01 /usr/sbin/httpd -k start -DSSL
apache    5245  0.8  0.1 1121488 17412 
?       S    01:34   0:00 /usr/sbin/httpd -k start -DSSL
apache    5248  0.9  0.1 1118932 16800 
?       S    01:34   0:00 /usr/sbin/httpd -k start -DSSL
apache    5250  1.0  0.1 1118972 15800 
?       S    01:34   0:01 /usr/sbin/httpd -k start -DSSL
apache    5251  2.0  0.2 1124372 20632 
?       S    01:34   0:01 /usr/sbin/httpd -k start -DSSL
apache    5253  0.6  0.1 1174188 17048 
?       S    01:34   0:00 /usr/sbin/httpd -k start -DSSL
apache    5258  0.8  0.1 1119036 16352 
?       S    01:34   0:00 /usr/sbin/httpd -k start -DSSL
apache    5261  1.4  0.1 1121324 19464 
?       S    01:34   0:01 /usr/sbin/httpd -k start -DSSL
apache    5262  1.7  0.1 1123784 20444 
?       S    01:34   0:01 /usr/sbin/httpd -k start -DSSL
apache    5263  1.3  0.1 1121164 17584 
?       S    01:34   0:01 /usr/sbin/httpd -k start -DSSL
apache    5265  0.9  0.1 1121240 15920 
?       S    01:34   0:00 /usr/sbin/httpd -k start -DSSL
apache    5267  0.4  0.1 1123164 19724 
?       S    01:34   0:00 /usr/sbin/httpd -k start -DSSL
apache    5268  1.2  0.2 1126440 23312 
?       S    01:34   0:01 /usr/sbin/httpd -k start -DSSL
apache    5269  1.0  0.2 1135052 30468 
?       S    01:34   0:00 /usr/sbin/httpd -k start -DSSL
apache    5293  1.6  0.1 1123356 19368 
?       S    01:35   0:00 /usr/sbin/httpd -k start -DSSL
apache    5296  2.2  0.1 1121184 17240 
?       S    01:35   0:00 /usr/sbin/httpd -k start -DSSL
apache    5297  1.6  0.1 1118932 14856 
?       S    01:35   0:00 /usr/sbin/httpd -k start -DSSL
apache    5300  1.5  0.2 1123988 22188 
?       S    01:35   0:00 /usr/sbin/httpd -k start -DSSL
apache    5301  1.1  0.1 1125424 18960 
?       R    01:35   0:00 /usr/sbin/httpd -k start -DSSL
root      5356  0.0  0.0  65940  1256 pts
/0    S    01:35   0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/server2.step
mysql     5380 57.0  4.9 2838596 509116 pts
/0  Sl   01:35   0:08 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql
apache    5411  7.7  0.1 1119172 14920 
?       S    01:35   0:00 /usr/sbin/httpd -k start -DSSL
apache    5412  3.8  0.2 1132804 29840 
?       R    01:35   0:00 /usr/sbin/httpd -k start -DSSL
apache    5413  0.0  0.0 1117104 6700 
?        S    01:35   0:00 /usr/sbin/httpd -k start -DSSL
apache    5414  4.4  0.0      0     0 
?        Z    01:35   0:00 [httpd] <defunct>
apache    5416  2.4  0.1 1119548 14780 ?       S    01:35   0:00 /usr/sbin/httpd -k start -DSSL
apache    5417  0.0  0.0 1116964 6556 
?        S    01:35   0:00 /usr/sbin/httpd -k start -DSSL
apache    5418  3.3  0.1 1123492 18212 
?       S    01:35   0:00 /usr/sbin/httpd -k start -DSSL
root      5419  0.0  0.0  65604   956 pts
/0    R+   01:35   0:00 ps aux
root      6453  0.0  0.0      0     0 
?        S    Apr01   0:16 [pdflush]
dovecot   9644  0.0  0.0  27976  1988 ?        S    Apr02   0:00 imap-login
dovecot   9645  0.0  0.0  27980  1992 
?        S    Apr02   0:00 imap-login
dovecot   9794  0.0  0.0  27120  1996 
?        S    Apr02   0:00 imap-login
dovecot   9798  0.0  0.0  27976  1988 
?        S    Apr02   0:00 imap-login
dovecot   9867  0.0  0.0  27112  1992 
?        S    Apr02   0:00 pop3-login
dovecot   9881  0.0  0.0  27972  1992 
?        S    Apr02   0:00 pop3-login
dovecot   9882  0.0  0.0  27968  1988 
?        S    Apr02   0:00 pop3-login
dovecot   9883  0.0  0.0  27968  1992 
?        S    Apr02   0:00 pop3-login
dovecot   9989  0.0  0.0  27972  1992 
?        S    Apr02   0:00 pop3-login
dovecot   9990  0.0  0.0  27968  1988 
?        S    Apr02   0:00 pop3-login
root     14014  0.0  0.0  86768  3284 
?        Rs   Apr02   0:01 sshdroot@pts/0
root     14050  0.0  0.0  66080  1596 pts
/0    Ss   Apr02   0:00 -bash
nobody   23594  0.0  0.0  45228   328 
?        S    Apr02   0:00 /usr/local/directadmin/directadmin d
nobody   23625  0.0  0.0  45228   328 
?        S    Apr02   0:00 /usr/local/directadmin/directadmin d
nobody   23628  0.0  0.0  45228   328 
?        S    Apr02   0:00 /usr/local/directadmin/directadmin d
nobody   23629  0.0  0.0  45228   328 
?        S    Apr02   0:00 /usr/local/directadmin/directadmin d
nobody   23643  0.0  0.0  45228   328 
?        S    Apr02   0:00 /usr/local/directadmin/directadmin d
root     23749  0.0  0.0 1116964 9276 
?        Ss   Apr02   0:01 /usr/sbin/httpd -k start -DSSL
root     25022  0.0  0.0      0     0 
?        S    Apr01   0:05 [pdflush

Last edited by Stephan_Craft; 04-02-2009 at 05:52 PM.
 
Old 04-02-2009, 06:32 PM   #4
sleddog
Member
 
Registered: Jan 2002
Location: Labrador, Canada
Distribution: CentOS, Debian
Posts: 182

Rep: Reputation: 35
max_connections servers as a limiter. Every mysql connections uses some memory; if max_connections is too high mysql will continue to accept connections even if your server's memory is exhausted. Then the server will start to swap and become very slow. By setting a realistic max_connections you protect the server from this.

You should do some searching and reading on how to optimize mysql and apache. Mysql has a thread cache and a query cache that can help immensely, but which are not activated by default. Apache also has several setting that affect performance. There are many websites discussing this. A little googling will turn up a lot of information..
 
Old 04-02-2009, 07:44 PM   #5
Stephan_Craft
Member
 
Registered: Jul 2008
Posts: 184

Original Poster
Rep: Reputation: 30
Alright. thanks for the help
 
Old 04-03-2009, 02:12 AM   #6
Stephan_Craft
Member
 
Registered: Jul 2008
Posts: 184

Original Poster
Rep: Reputation: 30
but i still didn't get the answer why there is so many sleep processes?
 
Old 04-03-2009, 07:05 PM   #7
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,348

Rep: Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749
httpd is a stateless protocol, so if you have 300 people in your websites, each associated httpd proc is waiting for them to type something in
and send the page request to the server.
 
Old 04-04-2009, 03:51 AM   #8
Stephan_Craft
Member
 
Registered: Jul 2008
Posts: 184

Original Poster
Rep: Reputation: 30
alright than how to check if mysql is sleeping?
 
Old 04-04-2009, 07:50 AM   #9
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Any time a program is not actively running it is sleeping. There is nothing wrong with a program sleeping. You can see which programs are running or sleeping (or other) with top.

Code:
mysql     5380 57.0  4.9 2838596 509116 pts/0  Sl   01:35   0:08 /usr/sbin/mysq
That S means sleep. See "man top" for a list of the other states that can appear in that column.
 
Old 04-06-2009, 02:31 AM   #10
Stephan_Craft
Member
 
Registered: Jul 2008
Posts: 184

Original Poster
Rep: Reputation: 30
Thanks I'll remember that.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
sleeping daemons liri Programming 1 10-03-2007 05:27 AM
ddclient sleeping zmdlan Linux - Networking 4 06-28-2006 11:54 AM
sleeping eth1 eth777 Linux - Networking 0 09-13-2005 12:17 PM
Sleeping Nukem Mandriva 6 01-07-2004 05:03 AM
Sleeping system wyvis Linux - General 4 01-17-2002 05:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration