-1

I have website working fine before. But now its not able to connect to the server(I believe that is the problem). But its strange that the message not able to connect to the server is not coming and its keep connecting... for infinite time(its been 3hrs). And then I discovered the the apache is in sleep mode. Does that causing the problem ?

Here is the output of ps aux

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0  19204   744 ?        Ss   Aug07   0:01 /sbin/init
root         2  0.0  0.0      0     0 ?        S    Aug07   0:00 [kthreadd]
root         3  0.0  0.0      0     0 ?        S    Aug07   0:00 [migration/0]
root         4  0.0  0.0      0     0 ?        S    Aug07   7:15 [ksoftirqd/0]
root         5  0.0  0.0      0     0 ?        S    Aug07   0:00 [migration/0]
root         6  0.0  0.0      0     0 ?        S    Aug07   0:00 [watchdog/0]
root         7  0.0  0.0      0     0 ?        S    Aug07   0:05 [events/0]
root         8  0.0  0.0      0     0 ?        S    Aug07   0:00 [cpuset]
root         9  0.0  0.0      0     0 ?        S    Aug07   0:00 [khelper]
root        10  0.0  0.0      0     0 ?        S    Aug07   0:00 [netns]
root        11  0.0  0.0      0     0 ?        S    Aug07   0:00 [async/mgr]
root        12  0.0  0.0      0     0 ?        S    Aug07   0:00 [pm]
root        13  0.0  0.0      0     0 ?        S    Aug07   0:00 [sync_supers]
root        14  0.0  0.0      0     0 ?        S    Aug07   0:00 [bdi-default]
root        15  0.0  0.0      0     0 ?        S    Aug07   0:00 [kintegrityd/0]
root        16  0.0  0.0      0     0 ?        S    Aug07   0:24 [kblockd/0]
root        17  0.0  0.0      0     0 ?        S    Aug07   0:00 [kacpid]
root        18  0.0  0.0      0     0 ?        S    Aug07   0:00 [kacpi_notify]
root        19  0.0  0.0      0     0 ?        S    Aug07   0:00 [kacpi_hotplug]
root        20  0.0  0.0      0     0 ?        S    Aug07   0:00 [ata/0]
root        21  0.0  0.0      0     0 ?        S    Aug07   0:00 [ata_aux]
root        22  0.0  0.0      0     0 ?        S    Aug07   0:00 [ksuspend_usbd]
root        23  0.0  0.0      0     0 ?        S    Aug07   0:00 [khubd]
root        24  0.0  0.0      0     0 ?        S    Aug07   0:00 [kseriod]
root        25  0.0  0.0      0     0 ?        S    Aug07   0:00 [md/0]
root        26  0.0  0.0      0     0 ?        S    Aug07   0:00 [md_misc/0]
root        27  0.0  0.0      0     0 ?        S    Aug07   0:00 [khungtaskd]
root        28  0.0  0.0      0     0 ?        S    Aug07   0:19 [kswapd0]
root        29  0.0  0.0      0     0 ?        SN   Aug07   0:00 [ksmd]
root        30  0.0  0.0      0     0 ?        SN   Aug07   1:36 [khugepaged]
root        31  0.0  0.0      0     0 ?        S    Aug07   0:00 [aio/0]
root        32  0.0  0.0      0     0 ?        S    Aug07   0:00 [crypto/0]
root        37  0.0  0.0      0     0 ?        S    Aug07   0:00 [kthrotld/0]
root        38  0.0  0.0      0     0 ?        S    Aug07   0:00 [pciehpd]
root        40  0.0  0.0      0     0 ?        S    Aug07   0:00 [kpsmoused]
root        41  0.0  0.0      0     0 ?        S    Aug07   0:00 [usbhid_resumer]
root        71  0.0  0.0      0     0 ?        S    Aug07   0:00 [kstriped]
root       203  0.0  0.0      0     0 ?        S    Aug07   0:00 [scsi_eh_0]
root       206  0.0  0.0      0     0 ?        S    Aug07   0:00 [scsi_eh_1]
root       213  0.0  0.0      0     0 ?        S    Aug07   0:00 [mpt_poll_0]
root       214  0.0  0.0      0     0 ?        S    Aug07   0:00 [mpt/0]
root       215  0.0  0.0      0     0 ?        S    Aug07   0:00 [scsi_eh_2]
root       317  0.0  0.0      0     0 ?        S    Aug07   0:00 [kdmflush]
root       319  0.0  0.0      0     0 ?        S    Aug07   0:00 [kdmflush]
root       338  0.0  0.0      0     0 ?        S    Aug07   4:30 [jbd2/dm-0-8]
root       339  0.0  0.0      0     0 ?        S    Aug07   0:00 [ext4-dio-unwrit]
root       411  0.0  0.0  11060   224 ?        S<s  Aug07   0:00 /sbin/udevd -d
root       591  0.0  0.0      0     0 ?        S    Aug07   0:00 [vmmemctl]
root       732  0.0  0.0      0     0 ?        S    Aug07   0:00 [jbd2/sda1-8]
root       733  0.0  0.0      0     0 ?        S    Aug07   0:00 [ext4-dio-unwrit]
root       770  0.0  0.0      0     0 ?        S    Aug07   0:00 [kauditd]
root       907  0.0  0.0      0     0 ?        S    Aug07   0:02 [flush-253:0]
root       963  0.0  0.0  93180   528 ?        S<sl Aug07   0:00 auditd
root       979  0.0  0.0 248680  1132 ?        Sl   Aug07   0:04 /sbin/rsyslogd -i /var/run/syslogd.pid -c 4
dbus       991  0.0  0.0  31740   348 ?        Ssl  Aug07   0:00 dbus-daemon --system
root      1023  0.0  0.0  64032   456 ?        Ss   Aug07   0:01 /usr/sbin/sshd
root      1031  0.0  0.0  22076   592 ?        Ss   Aug07   0:00 xinetd -stayalive -pidfile /var/run/xinetd.pid
root      1107  0.0  0.0  78652   744 ?        Ss   Aug07   0:01 /usr/libexec/postfix/master
postfix   1116  0.0  0.0  78904   852 ?        S    Aug07   0:00 qmgr -l -t fifo -u
qpidd     1129  0.0  0.0 234596  1488 ?        Ssl  Aug07   1:54 /usr/sbin/qpidd --data-dir /var/lib/qpidd --daemon
root      1181  0.0  0.0 117176   532 ?        Ss   Aug07   0:04 crond
root      1217  0.0  0.0 108152   412 ?        S    Aug07   0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --socket=/var/lib/mysql/m
mysql     1306  0.0  1.8 792636 72640 ?        Sl   Aug07   6:51 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --log-
root      1334  0.0  0.1 739156  5520 ?        Ssl  Aug07   0:34 /usr/sbin/shibd -p /var/run/shibboleth/shibd.pid -f -w 30
root      1355  0.0  0.0   4048   272 tty2     Ss+  Aug07   0:00 /sbin/mingetty /dev/tty2
root      1357  0.0  0.0   4048   272 tty3     Ss+  Aug07   0:00 /sbin/mingetty /dev/tty3
root      1360  0.0  0.0  12336   264 ?        S<   Aug07   0:00 /sbin/udevd -d
root      1361  0.0  0.0  12336   240 ?        S<   Aug07   0:00 /sbin/udevd -d
root      1362  0.0  0.0   4048   272 tty4     Ss+  Aug07   0:00 /sbin/mingetty /dev/tty4
root      1364  0.0  0.0   4048   272 tty5     Ss+  Aug07   0:00 /sbin/mingetty /dev/tty5
root      1366  0.0  0.0   4048   272 tty6     Ss+  Aug07   0:00 /sbin/mingetty /dev/tty6
root      1394  0.0  0.0 574892   436 ?        Sl   Aug07   0:00 /usr/sbin/console-kit-daemon --no-daemon
root      1495  0.0  0.0   4048   264 tty1     Ss+  Aug07   0:00 /sbin/mingetty /dev/tty1
root      7665  0.0  0.1 296304  6244 ?        Ss   Aug16   2:33 /usr/sbin/httpd
apache   10298  0.0  0.2 457756 10472 ?        Sl   Sep07   3:35 /usr/sbin/httpd
apache   11684  0.0  0.5 465352 20708 ?        Sl   Sep12   0:02 /usr/sbin/httpd
apache   14570  0.0  0.7 475592 30628 ?        Sl   Sep12   0:02 /usr/sbin/httpd
apache   14877  0.0  0.5 467868 22696 ?        Sl   Sep12   0:01 /usr/sbin/httpd
apache   15128  0.0  0.4 464628 19096 ?        Sl   Sep12   0:01 /usr/sbin/httpd
apache   15151  0.0  0.4 464624 18980 ?        Sl   Sep12   0:01 /usr/sbin/httpd
apache   15169  0.0  0.6 470268 24636 ?        Sl   Sep12   0:01 /usr/sbin/httpd
apache   15238  0.0  0.4 464628 19108 ?        Sl   Sep12   0:01 /usr/sbin/httpd
apache   15266  0.0  0.4 464624 18920 ?        Sl   Sep12   0:02 /usr/sbin/httpd
apache   15312  0.0  0.4 464624 18724 ?        Sl   Sep12   0:01 /usr/sbin/httpd
apache   15427  0.0  0.6 470268 24644 ?        Sl   Sep12   0:00 /usr/sbin/httpd
apache   15814  0.0  0.4 464884 19296 ?        Sl   00:14   0:01 /usr/sbin/httpd
apache   15830  0.0  0.4 464628 19028 ?        Sl   00:24   0:00 /usr/sbin/httpd
apache   15859  0.0  0.7 475524 30320 ?        Sl   00:31   0:00 /usr/sbin/httpd
apache   15897  0.0  0.6 471876 26056 ?        Sl   00:42   0:00 /usr/sbin/httpd
apache   15926  0.0  0.4 464884 18936 ?        Sl   00:46   0:01 /usr/sbin/httpd
apache   15970  0.0  0.6 470268 24216 ?        Sl   00:57   0:00 /usr/sbin/httpd
apache   16010  0.0  0.4 464884 18912 ?        Sl   01:04   0:00 /usr/sbin/httpd
apache   16023  0.0  0.3 457756 12300 ?        Sl   01:05   0:02 /usr/sbin/httpd
apache   16176  0.0  0.4 464624 18568 ?        Sl   02:01   0:01 /usr/sbin/httpd
apache   16213  0.0  0.4 464624 18900 ?        Sl   02:22   0:01 /usr/sbin/httpd
apache   16240  0.0  0.4 464884 18828 ?        Sl   02:35   0:00 /usr/sbin/httpd
root     16313  0.0  0.0  19372   968 ?        Ss   03:01   0:00 /usr/sbin/anacron -s
apache   16361  0.0  0.4 464624 18572 ?        Sl   03:17   0:00 /usr/sbin/httpd
apache   16364  0.0  0.4 464884 19284 ?        Sl   03:19   0:01 /usr/sbin/httpd
root     16421  0.0  0.0   9180  1300 ?        SN   03:37   0:00 /bin/bash /usr/bin/run-parts /etc/cron.daily
root     16426  0.0  0.0   9312  1404 ?        SN   03:37   0:00 /bin/bash /etc/cron.daily/backupdb
root     16427  0.0  0.0   9064   820 ?        SN   03:37   0:00 awk -v progname /etc/cron.daily/backupdb progname {?????   print progname ":\n"
root     16434  0.0  0.0  50776  2420 ?        SN   03:37   0:00 mysqldump --opt --quote-names -u root -px xxx inamiriziv_dokeos_user personal_a
root     16435  0.0  0.0   4280   536 ?        SN   03:37   0:00 gzip --rsyncable
apache   16484  0.0  0.2 457584 11432 ?        Sl   03:55   0:04 /usr/sbin/httpd
apache   16492  0.0  0.4 464884 19320 ?        Sl   03:58   0:02 /usr/sbin/httpd
apache   16496  0.0  0.4 464624 18704 ?        Sl   04:00   0:02 /usr/sbin/httpd
apache   16529  0.0  0.6 470268 24608 ?        Sl   04:06   0:02 /usr/sbin/httpd
apache   16533  0.0  0.4 464624 18532 ?        Sl   04:10   0:00 /usr/sbin/httpd
apache   16536  0.0  0.4 464884 18908 ?        Sl   04:10   0:00 /usr/sbin/httpd
apache   16556  0.0  0.4 464884 18924 ?        Sl   04:18   0:02 /usr/sbin/httpd
apache   16563  0.0  0.3 457756 12384 ?        Sl   04:19   0:07 /usr/sbin/httpd
apache   16598  0.0  0.3 457756 12344 ?        Sl   04:28   0:02 /usr/sbin/httpd
apache   16633  0.0  0.4 464624 18492 ?        Sl   04:41   0:00 /usr/sbin/httpd
apache   16637  0.0  0.6 470268 24300 ?        Sl   04:41   0:02 /usr/sbin/httpd
apache   16654  0.0  0.3 457756 12296 ?        Sl   04:47   0:02 /usr/sbin/httpd
apache   16665  0.0  0.6 470268 24308 ?        Sl   04:50   0:03 /usr/sbin/httpd
apache   16738  0.0  0.6 470268 24312 ?        Sl   05:10   0:02 /usr/sbin/httpd
  apache   17388  0.0  0.2 457584 11440 ?        Sl   08:56   0:01 /usr/sbin/httpd
apache   17391  0.0  0.3 457756 12296 ?        Sl   08:57   0:00 /usr/sbin/httpd
apache   17397  0.0  0.3 457756 12312 ?        Sl   08:59   0:00 /usr/sbin/httpd
apache   17401  0.0  0.3 457756 12284 ?        Sl   09:00   0:00 /usr/sbin/httpd
apache   17420  0.0  0.2 457584 11436 ?        Sl   09:04   0:01 /usr/sbin/httpd
apache   17426  0.0  0.3 457756 12324 ?        Sl   09:07   0:01 /usr/sbin/httpd
apache   17431  0.0  0.3 457756 12276 ?        Sl   09:08   0:03 /usr/sbin/httpd
apache   17434  0.0  0.3 457756 12308 ?        Sl   09:08   0:00 /usr/sbin/httpd
apache   17437  0.0  0.2 457584 11440 ?        Sl   09:09   0:01 /usr/sbin/httpd
apache   17442  0.0  0.2 457584 11436 ?        Sl   09:10   0:01 /usr/sbin/httpd
apache   17445  0.0  0.3 457756 12328 ?        Sl   09:11   0:01 /usr/sbin/httpd
apache   17449  0.0  0.3 457756 12292 ?        Sl   09:12   0:01 /usr/sbin/httpd
apache   17454  0.0  0.2 457584 11444 ?        Sl   09:15   0:01 /usr/sbin/httpd
apache   17457  0.0  0.2 457584 11436 ?        Sl   09:15   0:01 /usr/sbin/httpd
apache   17461  0.0  0.3 457756 12304 ?        Sl   09:16   0:01 /usr/sbin/httpd
apache   17465  0.0  0.2 457584 11444 ?        Sl   09:18   0:01 /usr/sbin/httpd
apache   17468  0.0  0.2 457584 11436 ?        Sl   09:18   0:01 /usr/sbin/httpd
apache   17473  0.0  0.4 464884 18940 ?        Sl   09:19   0:00 /usr/sbin/httpd
apache   17476  0.0  0.4 464628 18736 ?        Sl   09:20   0:00 /usr/sbin/httpd
apache   17479  0.0  0.2 457584 11440 ?        Sl   09:20   0:01 /usr/sbin/httpd
apache   17483  0.0  0.2 457584 11416 ?        Sl   09:21   0:00 /usr/sbin/httpd
apache   17486  0.0  0.3 457756 12296 ?        Sl   09:21   0:01 /usr/sbin/httpd
apache   17489  0.0  0.4 464884 18928 ?        Sl   09:21   0:00 /usr/sbin/httpd
apache   17492  0.0  0.2 457584 11260 ?        Sl   09:22   0:00 /usr/sbin/httpd
apache   17496  0.0  0.3 457756 12372 ?        Sl   09:22   0:01 /usr/sbin/httpd
apache   17500  0.0  0.2 457584 11428 ?        Sl   09:23   0:00 /usr/sbin/httpd
apache   17504  0.0  0.2 457584 11432 ?        Sl   09:25   0:00 /usr/sbin/httpd
apache   17509  0.0  0.3 457756 12336 ?        Sl   09:27   0:01 /usr/sbin/httpd
apache   17513  0.0  0.2 457584 11436 ?        Sl   09:29   0:01 /usr/sbin/httpd
apache   17517  0.0  0.2 457584 11448 ?        Sl   09:31   0:00 /usr/sbin/httpd
apache   17520  0.0  0.3 457584 12128 ?        Sl   09:32   0:00 /usr/sbin/httpd
apache   17525  0.0  0.4 464884 18960 ?        Sl   09:34   0:00 /usr/sbin/httpd
apache   17529  0.0  0.2 457584 11420 ?        Sl   09:36   0:00 /usr/sbin/httpd
apache   17533  0.0  0.2 457584 11436 ?        Sl   09:38   0:00 /usr/sbin/httpd
apache   17537  0.0  0.2 457584 11436 ?        Sl   09:38   0:00 /usr/sbin/httpd
apache   17542  0.0  0.4 464884 18840 ?        Sl   09:40   0:00 /usr/sbin/httpd
apache   17546  0.0  0.3 457756 12320 ?        Sl   09:41   0:00 /usr/sbin/httpd
apache   17550  0.0  0.2 457584 11440 ?        Sl   09:42   0:00 /usr/sbin/httpd
apache   17554  0.0  0.2 457584 11436 ?        Sl   09:43   0:00 /usr/sbin/httpd
apache   17557  0.0  0.2 457584 11436 ?        Sl   09:44   0:00 /usr/sbin/httpd
apache   17560  0.0  0.2 457584 11428 ?        Sl   09:44   0:01 /usr/sbin/httpd
apache   17568  0.0  0.4 464884 18824 ?        Sl   09:48   0:00 /usr/sbin/httpd
apache   17572  0.0  0.2 457584 11428 ?        Sl   09:48   0:00 /usr/sbin/httpd
apache   17575  0.0  0.2 457584 11428 ?        Sl   09:48   0:01 /usr/sbin/httpd
apache   17583  0.0  0.2 457584 11432 ?        Sl   09:50   0:00 /usr/sbin/httpd
apache   17586  0.0  0.3 457756 12264 ?        Sl   09:50   0:00 /usr/sbin/httpd
apache   17589  0.0  0.2 457584 11420 ?        Sl   09:51   0:00 /usr/sbin/httpd
apache   17597  0.0  0.2 457584 11420 ?        Sl   09:53   0:02 /usr/sbin/httpd
apache   17600  0.0  0.3 457756 12376 ?        Sl   09:54   0:00 /usr/sbin/httpd
apache   17604  0.0  0.2 457584 11436 ?        Sl   09:55   0:00 /usr/sbin/httpd
apache   17610  0.0  0.2 457584 11420 ?        Sl   09:59   0:00 /usr/sbin/httpd
apache   17615  0.0  0.2 457584 11424 ?        Sl   10:00   0:00 /usr/sbin/httpd
apache   17618  0.0  0.4 464884 19288 ?        Sl   10:00   0:00 /usr/sbin/httpd
apache   17635  0.0  0.2 457584 11416 ?        Sl   10:01   0:00 /usr/sbin/httpd
apache   17639  0.0  0.2 457584 11440 ?        Sl   10:02   0:00 /usr/sbin/httpd
apache   17643  0.0  0.2 457584 11448 ?        Sl   10:03   0:00 /usr/sbin/httpd
apache   17648  0.0  0.4 464884 18868 ?        Sl   10:06   0:00 /usr/sbin/httpd
apache   17651  0.0  0.2 457584 11416 ?        Sl   10:07   0:00 /usr/sbin/httpd
apache   17655  0.0  0.3 457756 12268 ?        Sl   10:08   0:01 /usr/sbin/httpd
apache   17658  0.0  0.2 457584 11440 ?        Sl   10:08   0:00 /usr/sbin/httpd
apache   17663  0.0  0.3 457756 12292 ?        Sl   10:11   0:00 /usr/sbin/httpd
apache   17666  0.0  0.2 457584 11432 ?        Sl   10:11   0:00 /usr/sbin/httpd
apache   17672  0.0  0.2 457584 11428 ?        Sl   10:14   0:00 /usr/sbin/httpd
apache   17676  0.0  0.2 457584 11424 ?        Sl   10:16   0:00 /usr/sbin/httpd
apache   17680  0.0  0.4 464884 18884 ?        Sl   10:16   0:00 /usr/sbin/httpd
apache   17683  0.0  0.2 457584 11420 ?        Sl   10:19   0:00 /usr/sbin/httpd
apache   17689  0.0  0.2 457584 11424 ?        Sl   10:23   0:00 /usr/sbin/httpd
apache   17692  0.0  0.2 457584 11428 ?        Sl   10:23   0:00 /usr/sbin/httpd
apache   17696  0.0  0.3 457584 11980 ?        Sl   10:25   0:00 /usr/sbin/httpd
apache   17699  0.0  0.2 457584 11436 ?        Sl   10:25   0:00 /usr/sbin/httpd
apache   17704  0.0  0.2 457584 11232 ?        Sl   10:27   0:00 /usr/sbin/httpd
apache   17711  0.0  0.2 457584 11412 ?        Sl   10:30   0:01 /usr/sbin/httpd
postfix  17714  0.0  0.0  78732  3216 ?        S    10:30   0:00 pickup -l -t fifo -u
apache   17715  0.0  0.2 457584 11436 ?        Sl   10:30   0:00 /usr/sbin/httpd
apache   17718  0.0  0.2 457584 11428 ?        Sl   10:31   0:00 /usr/sbin/httpd
apache   17726  0.0  0.2 457584 11420 ?        Sl   10:36   0:00 /usr/sbin/httpd
apache   17731  0.0  0.2 457584 11168 ?        Sl   10:37   0:00 /usr/sbin/httpd
apache   17734  0.0  0.4 464884 18796 ?        Sl   10:37   0:00 /usr/sbin/httpd
apache   17743  0.0  0.2 457584 11220 ?        Sl   10:43   0:00 /usr/sbin/httpd
apache   17746  0.0  0.2 457584 11172 ?        Sl   10:44   0:00 /usr/sbin/httpd
apache   17750  0.0  0.3 457756 12288 ?        Sl   10:44   0:00 /usr/sbin/httpd
apache   17753  0.0  0.2 457584 11220 ?        Sl   10:45   0:00 /usr/sbin/httpd
apache   17756  0.0  0.2 457584 11424 ?        Sl   10:46   0:00 /usr/sbin/httpd
apache   17763  0.0  0.3 457756 12204 ?        Sl   10:51   0:00 /usr/sbin/httpd
apache   17766  0.0  0.2 457584 11428 ?        Sl   10:51   0:00 /usr/sbin/httpd
apache   17771  0.0  0.2 457584 11180 ?        Sl   10:54   0:00 /usr/sbin/httpd
apache   17774  0.0  0.2 457584 11416 ?        Sl   10:54   0:00 /usr/sbin/httpd
apache   17779  0.0  0.2 457584 11428 ?        Sl   10:58   0:00 /usr/sbin/httpd
apache   17784  0.0  0.2 457584 11380 ?        Sl   11:00   0:00 /usr/sbin/httpd
apache   17805  0.0  0.2 457584 11380 ?        Sl   11:05   0:00 /usr/sbin/httpd
apache   17818  0.0  0.2 457584 11156 ?        Sl   11:11   0:00 /usr/sbin/httpd
apache   17823  0.0  0.2 457584 11416 ?        Sl   11:12   0:00 /usr/sbin/httpd
apache   17827  0.0  0.2 457584 11412 ?        Sl   11:13   0:00 /usr/sbin/httpd
apache   17831  0.0  0.2 457584 11132 ?        Sl   11:13   0:00 /usr/sbin/httpd
root     17835  0.0  0.0  97780  3792 ?        S    11:14   0:00 sshd: smaity [priv]
smaity   17839  0.0  0.0  97780  1748 ?        S    11:15   0:00 sshd: smaity@pts/0
smaity   17840  0.0  0.0 108288  1928 pts/0    Ss   11:15   0:00 -bash
apache   17858  0.0  0.4 464884 18856 ?        Sl   11:16   0:00 /usr/sbin/httpd
apache   17862  0.0  0.3 457584 11904 ?        Sl   11:17   0:00 /usr/sbin/httpd
apache   17866  0.0  0.2 457584 11212 ?        Sl   11:19   0:00 /usr/sbin/httpd
apache   17871  0.0  0.2 457584 11144 ?        Sl   11:20   0:00 /usr/sbin/httpd
apache   17875  0.0  0.2 457584 11416 ?        Sl   11:23   0:00 /usr/sbin/httpd
apache   17880  0.0  0.2 457584 11408 ?        Sl   11:23   0:00 /usr/sbin/httpd
apache   17883  0.0  0.2 457584 11412 ?        Sl   11:24   0:00 /usr/sbin/httpd
apache   17888  0.0  0.2 457584 11412 ?        Sl   11:25   0:00 /usr/sbin/httpd
apache   17891  0.0  0.2 457584 11140 ?        Sl   11:26   0:00 /usr/sbin/httpd
apache   17899  0.0  0.2 457584 10984 ?        Sl   11:32   0:00 /usr/sbin/httpd
apache   17902  0.0  0.2 457584 11680 ?        Sl   11:33   0:00 /usr/sbin/httpd
apache   17906  0.0  0.2 457584 10980 ?        Sl   11:33   0:00 /usr/sbin/httpd

UPDATE:

Output of wget http://mydomain.com/

--2012-09-13 13:35:17--  http://mydomain.com/
Resolving mydomain.com... 127.0.0.1
Connecting to mydomain.com|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 45 [text/html]
Saving to: “index.html”

 0% [                                                                                                       ] 0           --.-K/s   in 0s      


Cannot write to “index.html” (No space left on device).

output of df -h

 Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_inamivm-lv_root
                       18G   17G     0 100% /
tmpfs                 1.9G     0  1.9G   0% /dev/shm
/dev/sda1             485M   71M  389M  16% /boot

output of

wget -O /dev/null http://127.0.0.1/


--2012-09-13 13:47:49--  http://127.0.0.1/
Connecting to 127.0.0.1:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 45 [text/html]
Saving to: “/dev/null”

100%[======================================================================================================>] 45          --.-K/s   in 0s      

2012-09-13 13:47:54 (8.57 MB/s) - “/dev/null” saved [45/45]

Could you suggest any particular unnecessary file that I can clean to back everything to normal condition(temporarily). (i.e. any log or archieve or anything ) ?

Subhransu Mishra
  • 3,035
  • 11
  • 40
  • 47
  • Hi @Wooble the problem seams to be short out. My server do not have much space so that its not able to take any request. Please check the updated question . Please let me know how to clean some unnecessary file/folder to make space. It would be better if you could answer(and explain) this rather than comment. – Subhransu Mishra Sep 13 '12 at 12:11
  • @Wooble Thanks, I respect your comment. But the question is being asked in programming point of view initially. – Subhransu Mishra Sep 13 '12 at 12:53

1 Answers1

3

Cannot write to “index.html” (No space left on device).

Seems you have a disk full.

Run a

du -sk /* | sort -n

to see where your space is going. Might also be into "deleted" inodes, and if so you'll need to check where they are by checking /proc filesystem. To make the space reappear, you have to restart whatever the process is that is holding that file descriptor(s).

For systems like yours, usually space "disappears" in:

  • unrotated logs in /var/log or somewhere else
  • rotated and archived, but not removed (i.e. archived somewhere else) log files
  • temporary files in /tmp
  • uncollected Web sessions in "wherever your session save directory is"
  • temporary Web upload files in "wherever your temporary upload path is"
  • MySQL binlogs
  • old mail notifications (e.g. cron receipts).

I'm sorry, but without looking at the server configuration there's not very much that can be done.

As emergency procedure

NOTE: when doing some of the tasks below, you will notice that space seems to disappear. I.e., you delete a 50 Mb file, and free space remains zero. This means that some of the processes are finally dumping and saving their data to disk. As long as this keeps happening, do not restart the system if it can be avoided (data still in RAM will be lost), and do not stop any processes.

  • Stop Apache (apachectl stop, apache2ctl stop). This will prevent more load on the system, which is the most urgent thing, and possibly free some further temporary space. Stopping Apache does not risk losing data (perhaps some logs, but that's survivable).
  • check /tmp directory for unneeded files (do not just remove everything: CHECK it)
  • check mail queue with mailq command, just in case
  • verify that there is no useless mail in /var/spool/mail/somewhere (if there is, you can probably delete it)
  • if site is PHP, inspect PHP.ini to know where temporary file upload and sessions are
    • delete all session files (usually phpsess_*)
    • delete all temporary upload files
  • check all /var/log/ log files
    • delete useless and/or very old ones
    • place any .gz or .bz2 files somewhere else with FTP or scp
    • Check there are no unrotated log files (logs REALLY big).
      • if there are, in a pinch, zip them with gzip - be sure you have enough free space: to zip a 1 GB log file it's better to have 200 M free at least. Afterwards you'll have a whole GB free, but meanwhile, you need that free buffer space.
      • remember to configure correctly logrotate later.
  • ONLY if you have now enough space (about same size of database):
    • stop MySQL and restart it, to flush data, free temp space and start solid
    • verify there were no corruptions due to space unavailable
    • if necessary and possibile, purge master logs (see MySQL manual/site)
    • If you do not have sufficient space, choose the biggest Apache logs and move them out of the way on another server through FTP or SCP. Do not delete those logs, especially error logs. Then do the MySQL stop-restart thing; a MySQL kept running on a full system is a Bad Thing.
  • check Apache virtual hosts and their logs.
  • perhaps not useful to solve this emergency, but check big error.log files. This command will tell you the seven (you can ask for more) most frequent errors, that are not only responsibile for big, disk-eating log files, but also symptomatic of problems in the web site (or attempts to make problems): cut -f4 -d']' < /full/path/of/the/apache/error.log | sort | uniq -c | sort -rn | head -n 7
  • check all virtual host directories with du: if some of them are very big, investigate why (old backups? Useless media files? Rogue malware repository installed by hackers?). Again, you stand to gain space but also find possible problems.
  • restart Apache.
  • run this command:

    ls -la /proc/*/fd/* | grep deleted
    
  • if you see any "deleted" files, for example "/proc/3297/fd/4", then check with ps what process has PID 3297 and try restarting it, if possible and if it is safe to do so. This will free any space hogged by "temporary" deleted inodes.

Finally, do try and get a larger disk :-)

Some of the steps above (e.g. checking log files) should be performed periodically to ensure that new problems don't crop up.

(And no, unfortunately the list is far from being exhaustive)

LSerni
  • 55,617
  • 10
  • 65
  • 107