Nowe posty

Autor Wątek: Wysokie obciążenie serwera, pamięć na wyczerpaniu  (Przeczytany 4047 razy)

Walian

  • Gość
Witam wszystkich,

Korzystam z serwera dedykowanego w OVH.
Mamy na pokładzie procesor dwurdzeniowy i 2GB RAM.
Niestety z jakichś powodów od pewnego czasu serwer jest non stop obciążony, a pamięć bliska wyczerpaniu.

Dziwne jest to, że dzieje się to nawet wtedy, gdy baza MySQL nic nie robi - tzn na liście jej "procesów" nie ma skomplikowanych zapytań lub jest całkiem pusto.
Wygląda to, jakby winowajcą był Apache.  Czy takie użycie pamięci przypadające na każdy proces httpd jest "normalne"? I w ogóle czemu tak mało wolnej pamięci? Raz jest wolne 100 MB, za sekundę robi się z tego 10 MB i tak w kółko skacze. Przy dobrych wiatrach widziałem maksymalnie 700MB wolne, ale najczęściej jest to w przedziale 15 - 150 MB wolnej pamięci.

Server:
CentOS release 5.3 (Final)
2.6.33.5-xxxx-grs-ipv4-64

Procesor:
# cat /proc/cpuinfo:
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 23
model name      : Intel(R) Core(TM)2 Duo CPU     E7500  @ 2.93GHz
stepping        : 10
cpu MHz         : 2926.000
cache size      : 3072 KB
Polecenia wywoływane z konta root:
# df:
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/md1             250936116   5250176 233039496   3% /
/dev/md5             227504460  33182916 182855976  16% /home
/dev/shm               1006968         0   1006968   0% /dev/shm
# free -m:
             total       used       free     shared    buffers     cached
Mem:          1966       1917         49          0        219        960
-/+ buffers/cache:        737       1229
Swap:        11999        184      11814
# top:
http://img821.imageshack.us/img821/4228/screenmhr.png

# cat /proc/loadavg:
10.64 11.80 12.08 4/213 19462
Masakra?
# ping 127.0.0.1:
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.031 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.026 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.023 ms
64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.024 ms
64 bytes from 127.0.0.1: icmp_seq=5 ttl=64 time=0.026 ms
# ps -aux:
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQ
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0  10348   568 ?        Ss   Oct21   0:31 init [3]
root         2  0.0  0.0      0     0 ?        S    Oct21   0:00 [kthreadd]
root         3  0.0  0.0      0     0 ?        S    Oct21   0:03 [migration/0]
root         4  0.0  0.0      0     0 ?        S    Oct21   2:29 [ksoftirqd/0]
root         5  0.0  0.0      0     0 ?        S    Oct21   0:03 [migration/1]
root         6  0.0  0.0      0     0 ?        S    Oct21  31:01 [ksoftirqd/1]
root         7  0.0  0.0      0     0 ?        S    Oct21   3:17 [events/0]
root         8  0.0  0.0      0     0 ?        S    Oct21   5:12 [events/1]
root         9  0.0  0.0      0     0 ?        S    Oct21   0:00 [cpuset]
root        10  0.0  0.0      0     0 ?        S    Oct21   0:00 [khelper]
root        13  0.0  0.0      0     0 ?        S    Oct21   0:00 [netns]
root        17  0.0  0.0      0     0 ?        S    Oct21   0:00 [async/mgr]
root       254  0.0  0.0      0     0 ?        S    Oct21   0:03 [sync_supers]
root       256  0.0  0.0      0     0 ?        S    Oct21   0:29 [bdi-default]
root       257  0.0  0.0      0     0 ?        S    Oct21   0:00 [kintegrityd/0]
root       258  0.0  0.0      0     0 ?        S    Oct21   0:00 [kintegrityd/1]
root       260  0.0  0.0      0     0 ?        S    Oct21   0:40 [kblockd/0]
root       261  0.0  0.0      0     0 ?        S    Oct21   0:40 [kblockd/1]
root       262  0.0  0.0      0     0 ?        S    Oct21   0:00 [kacpid]
root       263  0.0  0.0      0     0 ?        S    Oct21   0:00 [kacpi_notify]
root       264  0.0  0.0      0     0 ?        S    Oct21   0:00 [kacpi_hotplug]
root       361  0.0  0.0      0     0 ?        S    Oct21   0:00 [ata/0]
root       362  0.0  0.0      0     0 ?        S    Oct21   0:00 [ata/1]
root       363  0.0  0.0      0     0 ?        S    Oct21   0:00 [ata_aux]
root       367  0.0  0.0      0     0 ?        S    Oct21   0:00 [ksuspend_usbd]
root       371  0.0  0.0      0     0 ?        S    Oct21   0:00 [khubd]
root       374  0.0  0.0      0     0 ?        S    Oct21   0:00 [kseriod]
root       386  0.0  0.0      0     0 ?        S<   Oct21   0:00 [kslowd000]
root       387  0.0  0.0      0     0 ?        S<   Oct21   0:00 [kslowd001]
root       411  0.0  0.0      0     0 ?        S    Oct21   0:00 [rpciod/0]
root       412  0.0  0.0      0     0 ?        S    Oct21   0:00 [rpciod/1]
root       413  0.0  0.0      0     0 ?        S    Oct21   0:00 [kvm-irqfd-clean]
root       451  0.0  0.0      0     0 ?        S    Oct21  48:01 [kswapd0]
root       452  0.0  0.0      0     0 ?        SN   Oct21   0:00 [ksmd]
root       453  0.0  0.0      0     0 ?        S    Oct21   0:00 [aio/0]
root       454  0.0  0.0      0     0 ?        S    Oct21   0:00 [aio/1]
root       458  0.0  0.0      0     0 ?        S    Oct21   0:00 [nfsiod]
root       462  0.0  0.0      0     0 ?        S    Oct21   0:00 [xfs_mru_cache]
root       463  0.0  0.0      0     0 ?        S    Oct21   0:00 [xfslogd/0]
root       464  0.0  0.0      0     0 ?        S    Oct21   0:00 [xfslogd/1]
root       465  0.0  0.0      0     0 ?        S    Oct21   0:00 [xfsdatad/0]
root       466  0.0  0.0      0     0 ?        S    Oct21   0:00 [xfsdatad/1]
root       467  0.0  0.0      0     0 ?        S    Oct21   0:00 [xfsconvertd/0]
root       468  0.0  0.0      0     0 ?        S    Oct21   0:00 [xfsconvertd/1]
root       469  0.0  0.0      0     0 ?        S    Oct21   0:00 [ocfs2_wq]
root       470  0.0  0.0      0     0 ?        S    Oct21   0:00 [o2quot/0]
root       471  0.0  0.0      0     0 ?        S    Oct21   0:00 [o2quot/1]
root       474  0.0  0.0      0     0 ?        S    Oct21   0:00 [user_dlm]
root       476  0.0  0.0      0     0 ?        S    Oct21   0:00 [glock_workqueue]
root       477  0.0  0.0      0     0 ?        S    Oct21   0:00 [glock_workqueue]
root       478  0.0  0.0      0     0 ?        S    Oct21   0:00 [delete_workqueu]
root       479  0.0  0.0      0     0 ?        S    Oct21   0:00 [delete_workqueu]
root       480  0.0  0.0      0     0 ?        S    Oct21   0:00 [crypto/0]
root       481  0.0  0.0      0     0 ?        S    Oct21   0:00 [crypto/1]
root      1199  0.0  0.0      0     0 ?        S    Oct21   0:00 [iscsi_eh]
root      1208  0.0  0.0      0     0 ?        S    Oct21   0:00 [fc_exch_workque]
root      1209  0.0  0.0      0     0 ?        S    Oct21   0:00 [fc_rport_eq]
root      1210  0.0  0.0      0     0 ?        S<   Oct21   0:00 [fcoethread/0]
root      1211  0.0  0.0      0     0 ?        S<   Oct21   0:00 [fcoethread/1]
root      1223  0.0  0.0      0     0 ?        S    Oct21   0:00 [scsi_eh_0]
root      1226  0.0  0.0      0     0 ?        S    Oct21   0:00 [scsi_eh_1]
root      1241  0.0  0.0      0     0 ?        S    Oct21   0:00 [mtdblockd]
root      1300  0.0  0.0      0     0 ?        S    Oct21   0:00 [kpsmoused]
root      1320  0.0  0.0      0     0 ?        S    Oct21   0:00 [kstriped]
root      1322  0.0  0.0      0     0 ?        S    Oct21   0:00 [kdelayd/0]
root      1323  0.0  0.0      0     0 ?        S    Oct21   0:00 [kdelayd/1]
root      1324  0.0  0.0      0     0 ?        S    Oct21   0:00 [kmpathd/0]
root      1325  0.0  0.0      0     0 ?        S    Oct21   0:00 [kmpathd/1]
root      1326  0.0  0.0      0     0 ?        S    Oct21   0:00 [kmpath_handlerd]
root      1327  0.0  0.0      0     0 ?        S    Oct21   0:00 [ksnapd]
root      1330  0.0  0.0      0     0 ?        S    Oct21   0:00 [edac-poller]
root      1345  0.0  0.0      0     0 ?        S    Oct21   0:00 [kondemand/0]
root      1346  0.0  0.0      0     0 ?        S    Oct21   0:00 [kondemand/1]
root      1347  0.0  0.0      0     0 ?        S    Oct21   0:00 [kconservative/0]
root      1348  0.0  0.0      0     0 ?        S    Oct21   0:00 [kconservative/1]
root      1377  0.0  0.0      0     0 ?        S    Oct21   0:00 [usbhid_resumer]
root      1414  0.0  0.0      0     0 ?        S    Oct21  41:06 [md5_raid1]
root      1419  0.1  0.0      0     0 ?        D    Oct21 121:29 [md1_raid1]
root      1422  0.0  0.0      0     0 ?        S    Oct21   7:47 [kjournald]
root      1485  0.0  0.0  12636   336 ?        S  Oct21   1:27 /sbin/udevd -d
root      3141  0.0  0.0      0     0 ?        S    Oct21  14:20 [flush-9:1]
root      3487  0.0  0.0      0     0 ?        S    Oct21   3:09 [flush-9:5]
root      3499  0.0  0.0      0     0 ?        S    Oct21   4:09 [kjournald]
root      3826  0.0  0.0   5908   316 ?        Ss   Oct21   0:58 syslogd -m 0
root      3829  0.0  0.0   3804   184 ?        Ss   Oct21   0:00 klogd -x
dbus      3854  0.0  0.0  21256   720 ?        Ss   Oct21   0:08 dbus-daemon --system
root      3880  0.0  0.0   6080   508 ?        Ss   Oct21   2:12 dovecot
root      3883  0.0  0.0  10916   936 ?        S    Oct21   1:37 dovecot-auth
root      3911  0.0  0.0  21640   184 ?        Ss   Oct21   0:00 xinetd -stayalive -pidfile /var/run/xinetd.pid
dovecot   3960  0.0  0.0  33876   280 ?        S    Oct21   0:00 pop3-login
dovecot   3964  0.0  0.0  33876   280 ?        S    Oct21   0:00 pop3-login
dovecot   3966  0.0  0.0  33876   280 ?        S    Oct21   0:00 pop3-login
dovecot   3967  0.0  0.0  33876   280 ?        S    Oct21   0:00 pop3-login
dovecot   3968  0.0  0.0  33876   280 ?        S    Oct21   0:00 pop3-login
dovecot   3971  0.0  0.0  33876   280 ?        S    Oct21   0:00 pop3-login
root      4012  0.0  0.0   1232   300 ?        Ss   Oct21   0:57 /usr/local/directadmin/da-popb4smtp
mail      4042  0.0  0.0  54588   392 ?        Ss   Oct21   0:06 /usr/sbin/exim -bd -q15m -oP /var/run/exim.pid
root      4057  0.0  0.0   6456   172 ?        Ss   Oct21   0:00 gpm -m /dev/input/mice -t exps2
ftp       4085  0.0  0.0   8804   488 ?        Ss   Oct21   0:16 proftpd: (accepting connections)
root      4098  0.0  0.0  74796   352 ?        Ss   Oct21   0:42 crond
root      4123  0.0  0.0  18732   228 ?        Ss   Oct21   0:00 /usr/sbin/atd
68        4148  0.0  0.0  33116  1132 ?        Ss   Oct21   0:50 hald
root      4149  0.0  0.0  21696   236 ?        S    Oct21   0:00 hald-runner
root      4186  0.0  0.0  18416   296 ?        S    Oct21   0:00 /usr/sbin/smartd -q never
root      4189  0.0  0.0   3792   160 tty1     Ss+  Oct21   0:00 /sbin/mingetty tty1
root      4190  0.0  0.0   3792   160 tty2     Ss+  Oct21   0:00 /sbin/mingetty tty2
root      4191  0.0  0.0   3792   160 tty3     Ss+  Oct21   0:00 /sbin/mingetty tty3
root      4192  0.0  0.0   3792   160 tty4     Ss+  Oct21   0:00 /sbin/mingetty tty4
root      4193  0.0  0.0   3792   160 tty5     Ss+  Oct21   0:00 /sbin/mingetty tty5
root      4194  0.0  0.0   3792   160 tty6     Ss+  Oct21   0:00 /sbin/mingetty tty6
root      4213  0.0  0.1 261080  3816 ?        SN   Oct21   0:24 /usr/bin/python -tt /usr/sbin/yum-updatesd
root      4215  0.0  0.0  12920   512 ?        SN   Oct21   2:27 /usr/libexec/gam_server
named     4253  0.1  0.5 224556 11712 ?        Ssl  Oct21 113:26 named -u named
dovecot   5426  0.0  0.0  33876  1260 ?        S    Dec14   0:00 pop3-login
dovecot   5449  0.0  0.0  33876  1260 ?        S    Dec14   0:00 pop3-login
dovecot   5472  0.0  0.0  33876  1260 ?        S    Dec14   0:00 pop3-login
dovecot   5487  0.0  0.0  33876  1260 ?        S    Dec14   0:00 pop3-login
dovecot   5568  0.0  0.0  33876  1260 ?        S    Dec14   0:00 pop3-login
dovecot   5579  0.0  0.0  33876  1260 ?        S    Dec14   0:00 pop3-login
nobody    6919  0.0  0.0  54736   248 ?        Ss   Nov27   0:00 /usr/local/directadmin/directadmin d
dovecot  10013  0.0  0.1  33888  2180 ?        S    10:19   0:00 imap-login
dovecot  10866  0.0  0.1  33888  2180 ?        S    10:20   0:00 imap-login
root     11019  0.0  0.1  84120  2704 ?        Ss   09:35   0:00 sshd: root@pts/0
root     11158  0.0  0.0  68112  1428 pts/0    Ss   09:36   0:00 -bash
dovecot  11316  0.0  0.1  33888  2180 ?        S    10:21   0:00 imap-login
dovecot  12732  0.0  0.1  33888  2180 ?        S    10:23   0:00 imap-login
dovecot  13070  0.0  0.1  33888  2180 ?        S    10:23   0:00 imap-login
dovecot  13301  0.0  0.0  33876  1260 ?        S    Dec14   0:00 pop3-login
dovecot  13483  0.0  0.1  33888  2180 ?        S    10:24   0:00 imap-login
nobody   13528  0.0  0.0  54736    48 ?        S    Dec14   0:00 /usr/local/directadmin/directadmin d
dovecot  13762  0.0  0.0  33876  1260 ?        S    Dec14   0:00 pop3-login
dovecot  13838  0.0  0.1  33888  2180 ?        S    10:24   0:00 imap-login
apache   13913  7.3  1.2 111784 24228 ?        D    10:24   0:27 /usr/sbin/httpd -k start -DSSL
root     14019  0.0  0.0  67980   244 ?        S    Dec09   0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/ns37617.ovh.
mysql    14046 17.1  2.9 309956 58744 ?        Sl   Dec09 1436:06 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysq
nobody   14241  0.0  0.0  54736    48 ?        S    Dec14   0:00 /usr/local/directadmin/directadmin d
dovecot  14245  0.0  0.1  33888  2180 ?        S    10:25   0:00 imap-login
dovecot  14263  0.0  0.1  33888  2180 ?        S    10:25   0:00 imap-login
nobody   14272  0.0  0.0  54736    48 ?        S    Dec14   0:00 /usr/local/directadmin/directadmin d
sphinx   14319  0.0  1.3 279940 27852 ?        Sl   Dec09   2:37 /usr/bin/searchd --config /etc/sphinx/sphinx.conf
dovecot  14325  0.0  0.1  33888  2180 ?        S    10:25   0:00 imap-login
dovecot  14903  0.0  0.1  33888  2180 ?        S    10:26   0:00 imap-login
nobody   14921  0.0  0.0  54736    48 ?        S    Dec14   0:00 /usr/local/directadmin/directadmin d
dovecot  14987  0.0  0.1  33888  2180 ?        S    10:26   0:00 imap-login
nobody   15051  0.0  0.0  54736    48 ?        S    Dec14   0:00 /usr/local/directadmin/directadmin d
dovecot  15114  0.0  0.1  33888  2180 ?        S    10:26   0:00 imap-login
apache   15219 12.0  0.7 103984 16020 ?        S    10:26   0:32 /usr/sbin/httpd -k start -DSSL
apache   15779  9.2  1.2 112648 24900 ?        D    10:27   0:21 /usr/sbin/httpd -k start -DSSL
apache   15780  8.3  1.1 165644 23420 ?        S    10:27   0:19 /usr/sbin/httpd -k start -DSSL
apache   15795  9.7  0.9 107652 19152 ?        R    10:27   0:23 /usr/sbin/httpd -k start -DSSL
apache   16003  7.0  0.9 108356 19188 ?        D    10:27   0:15 /usr/sbin/httpd -k start -DSSL
apache   16500  6.2  0.6  99796 12448 ?        S    10:28   0:11 /usr/sbin/httpd -k start -DSSL
apache   16893  6.3  1.2 113424 25460 ?        S    10:28   0:09 /usr/sbin/httpd -k start -DSSL
apache   16935 14.6  0.4  98160 10044 ?        S    10:28   0:21 /usr/sbin/httpd -k start -DSSL
apache   17193 10.1  0.6 101336 13024 ?        S    10:29   0:12 /usr/sbin/httpd -k start -DSSL
apache   17426  9.5  0.7 103892 14272 ?        D    10:29   0:10 /usr/sbin/httpd -k start -DSSL
dovecot  17532  0.0  0.1  33888  2180 ?        S    10:29   0:00 imap-login
apache   17629  7.7  0.9 109456 19292 ?        R    10:29   0:07 /usr/sbin/httpd -k start -DSSL
apache   17972  1.2  0.7 103552 15892 ?        S    10:30   0:00 /usr/sbin/httpd -k start -DSSL
apache   18001  0.6  0.7 103340 15412 ?        S    10:30   0:00 /usr/sbin/httpd -k start -DSSL
apache   18002 11.8  0.8 106784 16480 ?        S    10:30   0:07 /usr/sbin/httpd -k start -DSSL
apache   18004  0.5  0.4  97904  8960 ?        S    10:30   0:00 /usr/sbin/httpd -k start -DSSL
apache   18020  2.5  0.8 106360 18088 ?        R    10:30   0:01 /usr/sbin/httpd -k start -DSSL
apache   18090  0.7  0.5  99816 10620 ?        S    10:30   0:00 /usr/sbin/httpd -k start -DSSL
dovecot  18135  0.0  0.1  33888  2180 ?        S    10:30   0:00 imap-login
apache   18180  0.6  0.3  96432  7480 ?        S    10:30   0:00 /usr/sbin/httpd -k start -DSSL
apache   18191  0.3  0.4  97648  8688 ?        S    10:30   0:00 /usr/sbin/httpd -k start -DSSL
apache   18192  0.3  0.4  98568  9600 ?        S    10:30   0:00 /usr/sbin/httpd -k start -DSSL
apache   18202  0.6  0.5 100616 11268 ?        S    10:30   0:00 /usr/sbin/httpd -k start -DSSL
apache   18205  0.6  0.4  99016  9924 ?        S    10:30   0:00 /usr/sbin/httpd -k start -DSSL
apache   18215  0.2  0.4  96416  8400 ?        S    10:30   0:00 /usr/sbin/httpd -k start -DSSL
apache   18216  0.3  0.4  97248  9292 ?        S    10:30   0:00 /usr/sbin/httpd -k start -DSSL
apache   18217  4.5  0.3  96160  8008 ?        S    10:30   0:02 /usr/sbin/httpd -k start -DSSL
apache   18218  0.0  0.2  96196  5132 ?        S    10:30   0:00 /usr/sbin/httpd -k start -DSSL
apache   18229  2.1  0.6 101636 13548 ?        D    10:30   0:00 /usr/sbin/httpd -k start -DSSL
apache   18235  0.4  0.5 100464 11124 ?        S    10:30   0:00 /usr/sbin/httpd -k start -DSSL
apache   18238  0.2  0.3  96168  7204 ?        S    10:30   0:00 /usr/sbin/httpd -k start -DSSL
apache   18244  0.6  0.6 100808 12828 ?        S    10:30   0:00 /usr/sbin/httpd -k start -DSSL
dovecot  18285  0.0  0.1  33888  2180 ?        S    10:30   0:00 imap-login
apache   18746  1.2  0.4  99064  9744 ?        S    10:31   0:00 /usr/sbin/httpd -k start -DSSL
apache   18771  0.0  0.2  95748  4804 ?        S    10:31   0:00 /usr/sbin/httpd -k start -DSSL
apache   18786  0.0  0.2  95748  4800 ?        S    10:31   0:00 /usr/sbin/httpd -k start -DSSL
apache   18805  0.0  0.2  96148  4992 ?        S    10:31   0:00 /usr/sbin/httpd -k start -DSSL
apache   18806  0.0  0.2  96148  5084 ?        S    10:31   0:00 /usr/sbin/httpd -k start -DSSL
root     18810  0.0  0.0  65552   920 pts/0    R+   10:31   0:00 ps -aux
root     19796  0.0  0.0  60684   236 ?        Ss   Nov18   0:02 /usr/sbin/sshd
root     23432  0.0  0.2  93548  5328 ?        Ss   01:00   0:03 /usr/sbin/httpd -k start -DSSL
dovecot  30998  0.0  0.0  33876  1260 ?        S    Dec14   0:00 pop3-login
dovecot  31035  0.0  0.0  33876  1260 ?        S    Dec14   0:00 pop3-login
# dmesg (fragment), trochę tutaj nie zaciekawie:
raid1: md5 is not clean -- starting background reconstruction
raid1: raid set md5 active with 2 out of 2 mirrors
md5: detected capacity change from 0 to 234814832640
md: considering sdb1 ...
md: resync of RAID array md5
md: minimum _guaranteed_  speed: 1000 KB/sec/disk.
md: using maximum available idle IO bandwidth (but not more than 200000 KB/sec) for resync.
md: using 128k window, over a total of 229311360 blocks.
md:  adding sdb1 ...
md:  adding sda1 ...
md: created md1
md: bind
md: bind
md: running:
raid1: md1 is not clean -- starting background reconstruction
raid1: raid set md1 active with 2 out of 2 mirrors
md1: detected capacity change from 0 to 258999189504
md: ... autorun DONE.
 md1:
md: delaying resync of md1 until md5 has finished (they share one or more physical units)
 unknown partition table
EXT3-fs (md1): recovery required on readonly filesystem
EXT3-fs (md1): write access will be enabled during recovery
kjournald starting.  Commit interval 5 seconds
EXT3-fs (md1): orphan cleanup on readonly fs
ext3_orphan_cleanup: deleting unreferenced inode 5546479
ext3_orphan_cleanup: deleting unreferenced inode 4409616
ext3_orphan_cleanup: deleting unreferenced inode 4409615
ext3_orphan_cleanup: deleting unreferenced inode 5546478
ext3_orphan_cleanup: deleting unreferenced inode 4409614
ext3_orphan_cleanup: deleting unreferenced inode 4409486
ext3_orphan_cleanup: deleting unreferenced inode 5546477
ext3_orphan_cleanup: deleting unreferenced inode 5546280
ext3_orphan_cleanup: deleting unreferenced inode 5546271
ext3_orphan_cleanup: deleting unreferenced inode 5546269
ext3_orphan_cleanup: deleting unreferenced inode 5546300
ext3_orphan_cleanup: deleting unreferenced inode 5546291
ext3_orphan_cleanup: deleting unreferenced inode 5546282
ext3_orphan_cleanup: deleting unreferenced inode 5546281
ext3_orphan_cleanup: deleting unreferenced inode 5546236
ext3_orphan_cleanup: deleting unreferenced inode 5546256
ext3_orphan_cleanup: deleting unreferenced inode 5546245
ext3_orphan_cleanup: deleting unreferenced inode 5546240
ext3_orphan_cleanup: deleting unreferenced inode 5496839
ext3_orphan_cleanup: deleting unreferenced inode 4409558
ext3_orphan_cleanup: deleting unreferenced inode 4409545
ext3_orphan_cleanup: deleting unreferenced inode 5546268
ext3_orphan_cleanup: deleting unreferenced inode 4409540
ext3_orphan_cleanup: deleting unreferenced inode 4409468
ext3_orphan_cleanup: deleting unreferenced inode 5546267
ext3_orphan_cleanup: deleting unreferenced inode 5546266
ext3_orphan_cleanup: deleting unreferenced inode 5546260
ext3_orphan_cleanup: deleting unreferenced inode 4409513
ext3_orphan_cleanup: deleting unreferenced inode 5546259
ext3_orphan_cleanup: deleting unreferenced inode 5546246
ext3_orphan_cleanup: deleting unreferenced inode 5546235
ext3_orphan_cleanup: deleting unreferenced inode 5546227
ext3_orphan_cleanup: deleting unreferenced inode 5546225
ext3_orphan_cleanup: deleting unreferenced inode 5546221
ext3_orphan_cleanup: deleting unreferenced inode 5546217
ext3_orphan_cleanup: deleting unreferenced inode 5546211
ext3_orphan_cleanup: deleting unreferenced inode 5546202
ext3_orphan_cleanup: deleting unreferenced inode 5546251
ext3_orphan_cleanup: deleting unreferenced inode 4409570
ext3_orphan_cleanup: deleting unreferenced inode 4409547
ext3_orphan_cleanup: deleting unreferenced inode 5546255
ext3_orphan_cleanup: deleting unreferenced inode 4409546
ext3_orphan_cleanup: deleting unreferenced inode 4409535
ext3_orphan_cleanup: deleting unreferenced inode 5546241
ext3_orphan_cleanup: deleting unreferenced inode 5546223
ext3_orphan_cleanup: deleting unreferenced inode 4409474
ext3_orphan_cleanup: deleting unreferenced inode 4409460
ext3_orphan_cleanup: deleting unreferenced inode 4409399
ext3_orphan_cleanup: deleting unreferenced inode 4409455
ext3_orphan_cleanup: deleting unreferenced inode 4409430
ext3_orphan_cleanup: deleting unreferenced inode 5546226
ext3_orphan_cleanup: deleting unreferenced inode 5546208
ext3_orphan_cleanup: deleting unreferenced inode 5546206
ext3_orphan_cleanup: deleting unreferenced inode 5546205
ext3_orphan_cleanup: deleting unreferenced inode 5546201
ext3_orphan_cleanup: deleting unreferenced inode 5546203
ext3_orphan_cleanup: deleting unreferenced inode 5546199
ext3_orphan_cleanup: deleting unreferenced inode 5546198
ext3_orphan_cleanup: deleting unreferenced inode 5546193
ext3_orphan_cleanup: deleting unreferenced inode 5546043
ext3_orphan_cleanup: deleting unreferenced inode 13099952
ext3_orphan_cleanup: deleting unreferenced inode 13099950
ext3_orphan_cleanup: deleting unreferenced inode 4432711
ext3_orphan_cleanup: deleting unreferenced inode 4481899
ext3_orphan_cleanup: deleting unreferenced inode 4481952
ext3_orphan_cleanup: deleting unreferenced inode 4481837
ext3_orphan_cleanup: deleting unreferenced inode 4530246
ext3_orphan_cleanup: deleting unreferenced inode 4481918
ext3_orphan_cleanup: deleting unreferenced inode 4366884
ext3_orphan_cleanup: deleting unreferenced inode 4409463
ext3_orphan_cleanup: deleting unreferenced inode 4432723
ext3_orphan_cleanup: deleting unreferenced inode 7209045
ext3_orphan_cleanup: deleting unreferenced inode 4423691
ext3_orphan_cleanup: deleting unreferenced inode 5546297
ext3_orphan_cleanup: deleting unreferenced inode 4481758
ext3_orphan_cleanup: deleting unreferenced inode 4432720
ext3_orphan_cleanup: deleting unreferenced inode 4409617
ext3_orphan_cleanup: deleting unreferenced inode 5546330
ext3_orphan_cleanup: deleting unreferenced inode 5546334
ext3_orphan_cleanup: deleting unreferenced inode 4409584
ext3_orphan_cleanup: deleting unreferenced inode 4409583
ext3_orphan_cleanup: deleting unreferenced inode 5546326
ext3_orphan_cleanup: deleting unreferenced inode 4409569
ext3_orphan_cleanup: deleting unreferenced inode 4409559
ext3_orphan_cleanup: deleting unreferenced inode 5546323
ext3_orphan_cleanup: deleting unreferenced inode 5546315
ext3_orphan_cleanup: deleting unreferenced inode 5546314
ext3_orphan_cleanup: deleting unreferenced inode 5546313
ext3_orphan_cleanup: deleting unreferenced inode 4409464
ext3_orphan_cleanup: deleting unreferenced inode 4409449
ext3_orphan_cleanup: deleting unreferenced inode 4409405
ext3_orphan_cleanup: deleting unreferenced inode 4409011
ext3_orphan_cleanup: deleting unreferenced inode 4408523
ext3_orphan_cleanup: deleting unreferenced inode 4409443
ext3_orphan_cleanup: deleting unreferenced inode 4409445
ext3_orphan_cleanup: deleting unreferenced inode 4409425
ext3_orphan_cleanup: deleting unreferenced inode 5546320
ext3_orphan_cleanup: deleting unreferenced inode 5546310
ext3_orphan_cleanup: deleting unreferenced inode 4409397
ext3_orphan_cleanup: deleting unreferenced inode 5546307
ext3_orphan_cleanup: deleting unreferenced inode 5546298
ext3_orphan_cleanup: deleting unreferenced inode 5546295
ext3_orphan_cleanup: deleting unreferenced inode 5546302
ext3_orphan_cleanup: deleting unreferenced inode 5546292
ext3_orphan_cleanup: deleting unreferenced inode 5546289
ext3_orphan_cleanup: deleting unreferenced inode 5546288
ext3_orphan_cleanup: deleting unreferenced inode 5546284
ext3_orphan_cleanup: deleting unreferenced inode 4409398
ext3_orphan_cleanup: deleting unreferenced inode 5546257
ext3_orphan_cleanup: deleting unreferenced inode 5546252
ext3_orphan_cleanup: deleting unreferenced inode 5546270
ext3_orphan_cleanup: deleting unreferenced inode 5546265
ext3_orphan_cleanup: deleting unreferenced inode 5546258
ext3_orphan_cleanup: deleting unreferenced inode 5546239
ext3_orphan_cleanup: deleting unreferenced inode 5546216
ext3_orphan_cleanup: deleting unreferenced inode 8560647
ext3_orphan_cleanup: deleting unreferenced inode 8560646
ext3_orphan_cleanup: deleting unreferenced inode 8560645
ext3_orphan_cleanup: deleting unreferenced inode 8560644
ext3_orphan_cleanup: deleting unreferenced inode 8560643
EXT3-fs (md1): 120 orphan inodes deleted
EXT3-fs (md1): recovery complete
EXT3-fs (md1): mounted filesystem with writeback data mode
VFS: Mounted root (ext3 filesystem) readonly on device 9:1.
Freeing unused kernel memory: 640k freed
 md5: unknown partition table
r8169: eth0: link up
r8169: eth0: link up
EXT3-fs (md1): using internal journal
kjournald starting.  Commit interval 5 seconds
EXT3-fs (md5): using internal journal
EXT3-fs (md5): mounted filesystem with writeback data mode
Adding 6143508k swap on /dev/sda6.  Priority:-1 extents:1 across:6143508k
Adding 6143508k swap on /dev/sdb6.  Priority:-2 extents:1 across:6143508k
warning: process `kudzu' used the deprecated sysctl system call with 1.23.
warning: `dbus-daemon' uses 32-bit capabilities (legacy support in use)
md: md5: resync done.
md: resync of RAID array md1
md: minimum _guaranteed_  speed: 1000 KB/sec/disk.
md: using maximum available idle IO bandwidth (but not more than 200000 KB/sec) for resync.
md: using 128k window, over a total of 252928896 blocks.
RAID1 conf printout:
 --- wd:2 rd:2
 disk 0, wo:0, o:1, dev:sda5
 disk 1, wo:0, o:1, dev:sdb5
md: md1: resync done.
RAID1 conf printout:
 --- wd:2 rd:2
 disk 0, wo:0, o:1, dev:sda1
 disk 1, wo:0, o:1, dev:sdb1
grsec: From 80.48.6.47: Segmentation fault occurred at (null) in /usr/sbin/httpd[httpd:14232] uid/euid:100/100 gid/egid:500/500, parent /usr/sbin/httpd[httpd:7000] uid/euid:0/0 gid/egid:0/0
grsec: From 80.48.6.47: Segmentation fault occurred at 0000006400003798 in /usr/sbin/httpd[httpd:14232] uid/euid:100/100 gid/egid:500/500, parent /usr/sbin/httpd[httpd:7000] uid/euid:0/0 gid/egid:0/0
grsec: From 80.48.6.47: Segmentation fault occurred at 00007fff48b60e50 in /usr/sbin/httpd[httpd:27138] uid/euid:100/100 gid/egid:500/500, parent /usr/sbin/httpd[httpd:8274] uid/euid:0/0 gid/egid:0/0
grsec: From 80.48.6.47: Segmentation fault occurred at (null) in /usr/sbin/httpd[httpd:27138] uid/euid:100/100 gid/egid:500/500, parent /usr/sbin/httpd[httpd:8274] uid/euid:0/0 gid/egid:0/0
grsec: From 80.48.6.47: Segmentation fault occurred at 00007fff48b60eb0 in /usr/sbin/httpd[httpd:26840] uid/euid:100/100 gid/egid:500/500, parent /usr/sbin/httpd[httpd:8274] uid/euid:0/0 gid/egid:0/0
grsec: From 80.48.6.47: Segmentation fault occurred at (null) in /usr/sbin/httpd[httpd:26840] uid/euid:100/100 gid/egid:500/500, parent /usr/sbin/httpd[httpd:8274] uid/euid:0/0 gid/egid:0/0
grsec: From 80.48.6.47: Segmentation fault occurred at 00007fff48b60eb0 in /usr/sbin/httpd[httpd:27148] uid/euid:100/100 gid/egid:500/500, parent /usr/sbin/httpd[httpd:8274] uid/euid:0/0 gid/egid:0/0
grsec: From 80.48.6.47: Segmentation fault occurred at (null) in /usr/sbin/httpd[httpd:27148] uid/euid:100/100 gid/egid:500/500, parent /usr/sbin/httpd[httpd:8274] uid/euid:0/0 gid/egid:0/0
grsec: From 80.48.6.47: Segmentation fault occurred at 00007fff48b60eb0 in /usr/sbin/httpd[httpd:30000] uid/euid:100/100 gid/egid:500/500, parent /usr/sbin/httpd[httpd:8274] uid/euid:0/0 gid/egid:0/0
grsec: From 80.48.6.47: Segmentation fault occurred at (null) in /usr/sbin/httpd[httpd:30000] uid/euid:100/100 gid/egid:500/500, parent /usr/sbin/httpd[httpd:8274] uid/euid:0/0 gid/egid:0/0
grsec: Segmentation fault occurred at (null) in /usr/sbin/httpd[httpd:18696] uid/euid:100/100 gid/egid:500/500, parent /usr/sbin/httpd[httpd:5612] uid/euid:0/0 gid/egid:0/0
grsec: Segmentation fault occurred at 0000006400004908 in /usr/sbin/httpd[httpd:18696] uid/euid:100/100 gid/egid:500/500, parent /usr/sbin/httpd[httpd:5612] uid/euid:0/0 gid/egid:0/0
grsec: From 79.162.204.197: Segmentation fault occurred at (null) in /usr/sbin/httpd[httpd:22315] uid/euid:100/100 gid/egid:500/500, parent /usr/sbin/httpd[httpd:29368] uid/euid:0/0 gid/egid:0/0
grsec: From 79.162.204.197: Segmentation fault occurred at 000000640000572b in /usr/sbin/httpd[httpd:22315] uid/euid:100/100 gid/egid:500/500, parent /usr/sbin/httpd[httpd:29368] uid/euid:0/0 gid/egid:0/0
TCP: Peer 222.35.177.115:1481/80 unexpectedly shrunk window 3220299104:3220300544 (repaired)
TCP: Peer 217.224.41.242:1488/80 unexpectedly shrunk window 2784531457:2784543127 (repaired)
grsec: From 87.205.227.217: Segmentation fault occurred at (null) in /usr/sbin/httpd[httpd:9426] uid/euid:100/100 gid/egid:500/500, parent /usr/sbin/httpd[httpd:20072] uid/euid:0/0 gid/egid:0/0
grsec: From 87.205.227.217: Segmentation fault occurred at 00000064000024d2 in /usr/sbin/httpd[httpd:9426] uid/euid:100/100 gid/egid:500/500, parent /usr/sbin/httpd[httpd:20072] uid/euid:0/0 gid/egid:0/0
grsec: From 87.205.227.217: Segmentation fault occurred at (null) in /usr/sbin/httpd[httpd:9425] uid/euid:100/100 gid/egid:500/500, parent /usr/sbin/httpd[httpd:20072] uid/euid:0/0 gid/egid:0/0
grsec: From 87.205.227.217: Segmentation fault occurred at 00000064000024d1 in /usr/sbin/httpd[httpd:9425] uid/euid:100/100 gid/egid:500/500, parent /usr/sbin/httpd[httpd:20072] uid/euid:0/0 gid/egid:0/0
grsec: From 87.205.227.217: Segmentation fault occurred at (null) in /usr/sbin/httpd[httpd:9388] uid/euid:100/100 gid/egid:500/500, parent /usr/sbin/httpd[httpd:20072] uid/euid:0/0 gid/egid:0/0
grsec: more alerts, logging disabled for 10 seconds
UDP: short packet: From 210.31.199.5:53 10169/103 to 91.121.6.96:5403
grsec: From 83.4.37.139: Segmentation fault occurred at (null) in /usr/sbin/httpd[httpd:11305] uid/euid:100/100 gid/egid:500/500, parent /usr/sbin/httpd[httpd:12729] uid/euid:0/0 gid/egid:0/0
grsec: From 83.4.37.139: Segmentation fault occurred at 0000006400002c29 in /usr/sbin/httpd[httpd:11305] uid/euid:100/100 gid/egid:500/500, parent /usr/sbin/httpd[httpd:12729] uid/euid:0/0 gid/egid:0/0
TCP: Peer 86.166.17.242:58776/80 unexpectedly shrunk window 69838813:69840847 (repaired)
TCP: Peer 87.150.10.38:56818/80 unexpectedly shrunk window 2045521368:2045532368 (repaired)
TCP: Peer 79.200.90.237:3081/80 unexpectedly shrunk window 1977663277:1977664968 (repaired)
grsec: From 188.33.240.227: Segmentation fault occurred at 0000000000000090 in /usr/bin/searchd[searchd:13738] uid/euid:105/105 gid/egid:105/105, parent /sbin/init[init:1] uid/euid:0/0 gid/egid:0/0
searchd[13738]: segfault at 90 ip 000000325ee07558 sp 00007fffc92bca60 error 4 in libpthread-2.5.so[325ee00000+16000]
grsec: From 188.33.240.227: Segmentation fault occurred at 0000000000000090 in /usr/bin/searchd[searchd:13738] uid/euid:105/105 gid/egid:105/105, parent /sbin/init[init:1] uid/euid:0/0 gid/egid:0/0
grsec: From 213.25.16.20: Segmentation fault occurred at 0000000000000090 in /usr/bin/searchd[searchd:17491] uid/euid:105/105 gid/egid:105/105, parent /sbin/init[init:1] uid/euid:0/0 gid/egid:0/0
searchd[17491]: segfault at 90 ip 000000325ee07558 sp 00007ffffad23a60 error 4 in libpthread-2.5.so[325ee00000+16000]
grsec: From 213.25.16.20: Segmentation fault occurred at 0000000000000090 in /usr/bin/searchd[searchd:17491] uid/euid:105/105 gid/egid:105/105, parent /sbin/init[init:1] uid/euid:0/0 gid/egid:0/0
grsec: From 66.249.66.76: Segmentation fault occurred at (null) in /usr/sbin/httpd[httpd:32473] uid/euid:100/100 gid/egid:500/500, parent /usr/sbin/httpd[httpd:17866] uid/euid:0/0 gid/egid:0/0
grsec: From 66.249.66.76: Segmentation fault occurred at 0000006400007ed9 in /usr/sbin/httpd[httpd:32473] uid/euid:100/100 gid/egid:500/500, parent /usr/sbin/httpd[httpd:17866] uid/euid:0/0 gid/egid:0/0
UDP: bad checksum. From 86.185.34.172:27960 to 91.121.6.96:27963 ulen 23
TCP: Peer 88.202.127.231:34164/80 unexpectedly shrunk window 2334237628:2334237629 (repaired)
TCP: Peer 88.202.127.231:34164/80 unexpectedly shrunk window 2334237628:2334237629 (repaired)
TCP: Peer 88.202.127.231:6073/80 unexpectedly shrunk window 2358975688:2358975689 (repaired)
TCP: Peer 88.202.127.231:6073/80 unexpectedly shrunk window 2358975688:2358975689 (repaired)
TCP: Peer 88.202.127.231:34467/80 unexpectedly shrunk window 4041049059:4041049060 (repaired)
TCP: Peer 88.202.127.231:34467/80 unexpectedly shrunk window 4041049059:4041049060 (repaired)
Coś za dużo tych "Segmentation fault"...

Jak zlokalizować przyczynę problemów?


Edit by ChmOOrecK: tagi BBcode

chmooreck

  • Gość
Wysokie obciążenie serwera, pamięć na wyczerpaniu
« Odpowiedź #1 dnia: 2010-12-16, 14:35:30 »
Nie masz czasem jakiś błędów w skryptach (np. cgi) wywoływanych z apache'a ? (zżerają pamięć ile mogę dopóki nie dostaną po łbie segfaultem przy próbie odwołania do niezaalokowanej pamięci - być może autor nie sprawdza, czy udało się zaalokować ;-) )

Możesz sprawdzić, czy po wyłączeniu apache'a problem będzie nadal występował. zawsze to jakiś trop czy należy szukać gdzieś indziej.

Walian

  • Gość
Wysokie obciążenie serwera, pamięć na wyczerpaniu
« Odpowiedź #2 dnia: 2010-12-16, 16:03:58 »
Dzięki za odpowiedź.

W sumie mamy już pewien trop - możliwe, że obciążenie powoduje plik image_func.php ze skryptu Shoper, na którym mamy ok. 10 sklepów, w tym ok. 1000 aukcji na allegro, na których jest link prowadzący do pliku na naszym serwerze - czyli własnie do image_func.php, który (wg. mod_status z Apache) powoduje niepotrzebne obciążenie. Odseparowaliśmy ten plik, ale efekt ujrzymy dopiero za ok 1-2 miesiące - bo niektórzy wystawiają aukcje ponownie, co sprawia, że kod HTML aukcji wciąż pozostaje.

Co do alokacji pamięci - całkiem możliwe, z tym że:
1. Wyłączenie / zrestartowanie Apache nie wchodzi w grę. Zwłaszcza, że robiłem to kilka dni temu i nic to nie dało.
2. Oprócz tych 10 sklepów mamy jeszcze 3 własne serwisy, może to właśnie one powodują problem. Chodź są one bardzo mało (wręcz znikomo) odwiedzane.
Niestety ciężko odnaleźć przyczynę. Trzeba najpierw przekopać tony kodu, który po części nie był pisany przez nas (jeden serwis powstawał w oparciu o gotowy skrypt).
Ale nie zauważyłeś możliwych przyczyn awarii np. dysku (a byłem ciekaw, czy ktoś to wykluczy) więc chyba się zabierzemy za dokładniejsze sprawdzenie skryptów.

Przydał by się jakiś moduł pokazujący, który proces apache aktualnie obciąża serwer i jaki plik PHP wykonuje, ale nie udało mi się znaleźc nic lepszego (i darmowego) od mod_status.
Zastanawiało mnie też, czy może są jakieś typowe sytuacje, w których Apache tak zaczyna mulić - np. typowa, błędna konfiguracja.

Jakiś czas temu dziwiliśmy się też, czemu czasami nie ładuje się od razu główna strona jednego z serwisów, a dopiero po kilku odświeżeniach. Pewnie akurat się pamięć kończyła :)
Jeszcze dziwniejsze jest to, że ta sytuacja nie występuje, gdy wbijamy na stronkę z IP firmy :)

chmooreck

  • Gość
Wysokie obciążenie serwera, pamięć na wyczerpaniu
« Odpowiedź #3 dnia: 2010-12-16, 22:44:44 »
stety/niestety jestem programistą C/C++ i z php dużo nie pomogę, ale nie macie jakiegoś debuggera ? Google mi mówi, że coś się powinno dać pobadać nawet na środowisku produkcyjnym.

ZipoKing

  • Gość
Wysokie obciążenie serwera, pamięć na wyczerpaniu
« Odpowiedź #4 dnia: 2010-12-17, 09:47:20 »
Spróbujcie (jeżeli to się w ogóle da łatwo zrobić) zwiększyć ilość dostępnego RAMu - IMHO 2GB na kilkanaście serwisów (nawet średnio obciążonych) to stanowczo za malo.