apache getting stuck

Firstly, do:
Code:
netstat -nap --inet |grep -w 80|grep LISTEN

Or:
Code:
netstat -nap --inet |grep -w 443|grep LISTEN

You will see a process and PID of it which is using apache's port. You will see something like:
Code:
tcp        0      0 0.0.0.0:80              0.0.0.0:*
LISTEN      1111/exim

Then do lsof for it, and you will see something like my output :):
Code:
lsof -p [b]PID[/b]

Change PID with a PID of the process.
 
I never recommend to use "-9" flag, because it can damage the process (file or something more), if you don't think that it's true - try to kill mysql with "-9" few times a day and you will see some damaged databases. ;)
Your obfuscating. Of course killing mysqld with -9 can cause database damage, because it just stops a deamon that may be in the middle of writing to the database.

Checking exim.pl carefully the only file it appears to write to is a logfile. While it could damage that file (I don't think it will, since it's a flat file, but it could), that could be resolved by rewriting exim.pl to use the appropriate daemon to write the log entry.

I understand you don't agree with me. What do you recommend?

Jeff
 
Hmmm... eventually I find that installing mod_security and adding the lines to the mod_security rule file did the trick, as suggested by AWBS (Advanced Webhost Billing System) forum's security alert posted here:

http://forum.awbs.com/showthread.php?t=6718

Now I do not need to run the MySQL restart cronjob anymore and the CPU load remains under 2 since I did this.

Also I got a reply on AWBS forum to my questions on this issue. Here it is if someone is interested in knowing:

http://forum.awbs.com/showthread.php?p=37144#post37144
 
Anyone are still experiencing issue with exim+apache? :)
Yes

I am also getting this same problem:
Code:
[Fri Aug 17 00:11:02 2007] [notice] SIGHUP received.  Attempting to restart
[Fri Aug 17 00:11:03 2007] [notice] Apache/1.3.37 (Unix) mod_ssl/2.8.28 OpenSSL/0.9.7e PHP/4.4.7 mod_perl/1.29 FrontPage/5.0.2.2510 configured -- resuming normal operations
[Fri Aug 17 00:11:03 2007] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri Aug 17 00:11:03 2007] [notice] Accept mutex: sysvsem (Default: sysvsem)
[Fri Aug 17 00:14:01 2007] [notice] caught SIGTERM, shutting down
[Fri Aug 17 00:14:07 2007] [notice] Apache/1.3.37 (Unix) mod_ssl/2.8.28 OpenSSL/0.9.7e PHP/4.4.7 mod_perl/1.29 FrontPage/5.0.2.2510 configured -- resuming normal operations
[Fri Aug 17 00:14:07 2007] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri Aug 17 00:14:07 2007] [notice] Accept mutex: sysvsem (Default: sysvsem)
[Fri Aug 17 01:36:52 2007] [error] [client 64.246.0.110] File does not exist: /var/www/html/robots.txt
[Fri Aug 17 03:42:01 2007] [notice] caught SIGTERM, shutting down
[Fri Aug 17 03:42:05 2007] [notice] Apache/1.3.37 (Unix) mod_ssl/2.8.28 OpenSSL/0.9.7e PHP/4.4.7 mod_perl/1.29 FrontPage/5.0.2.2510 configured -- resuming normal operations
[Fri Aug 17 03:42:05 2007] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri Aug 17 03:42:05 2007] [notice] Accept mutex: sysvsem (Default: sysvsem)
[Fri Aug 17 13:45:02 2007] [notice] caught SIGTERM, shutting down
[Fri Aug 17 13:45:07 2007] [notice] Apache/1.3.37 (Unix) mod_ssl/2.8.28 OpenSSL/0.9.7e PHP/4.4.7 mod_perl/1.29 FrontPage/5.0.2.2510 configured -- resuming normal operations
[Fri Aug 17 13:45:07 2007] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri Aug 17 13:45:07 2007] [notice] Accept mutex: sysvsem (Default: sysvsem
[Fri Aug 17 18:28:01 2007] [notice] caught SIGTERM, shutting down

[B][COLOR="Red"]-- About here is when I became aware that websites hosted on this particular server were not responding to http requests. --[/COLOR][/B]

[Fri Aug 17 18:28:08 2007] [notice] Apache/1.3.37 (Unix) mod_ssl/2.8.28 OpenSSL/0.9.7e PHP/4.4.7 mod_perl/1.29 FrontPage/5.0.2.2510 configured -- resuming normal operations
[Fri Aug 17 18:28:08 2007] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri Aug 17 18:28:08 2007] [notice] Accept mutex: sysvsem (Default: sysvsem)
[Fri Aug 17 18:42:02 2007] [notice] caught SIGTERM, shutting down
[Fri Aug 17 18:42:08 2007] [notice] Apache/1.3.37 (Unix) mod_ssl/2.8.28 OpenSSL/0.9.7e PHP/4.4.7 mod_perl/1.29 FrontPage/5.0.2.2510 configured -- resuming normal operations
[Fri Aug 17 18:42:08 2007] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri Aug 17 18:42:08 2007] [notice] Accept mutex: sysvsem (Default: sysvsem)
[Fri Aug 17 18:50:01 2007] [notice] caught SIGTERM, shutting down
[Fri Aug 17 18:50:04 2007] [notice] Apache/1.3.37 (Unix) mod_ssl/2.8.28 OpenSSL/0.9.7e PHP/4.4.7 mod_perl/1.29 FrontPage/5.0.2.2510 configured -- resuming normal operations
[Fri Aug 17 18:50:04 2007] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri Aug 17 18:50:04 2007] [notice] Accept mutex: sysvsem (Default: sysvsem)
[Sat Aug 18 00:11:02 2007] [notice] SIGHUP received.  Attempting to restart
[Sat Aug 18 00:11:06 2007] [notice] Apache/1.3.37 (Unix) mod_ssl/2.8.28 OpenSSL/0.9.7e PHP/4.4.7 mod_perl/1.29 FrontPage/5.0.2.2510 configured -- resuming normal operations
[Sat Aug 18 00:11:06 2007] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sat Aug 18 00:11:06 2007] [notice] Accept mutex: sysvsem (Default: sysvsem)
[Sat Aug 18 00:13:02 2007] [notice] caught SIGTERM, shutting down
[Sat Aug 18 00:13:08 2007] [notice] Apache/1.3.37 (Unix) mod_ssl/2.8.28 OpenSSL/0.9.7e PHP/4.4.7 mod_perl/1.29 FrontPage/5.0.2.2510 configured -- resuming normal operations
[Sat Aug 18 00:13:08 2007] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sat Aug 18 00:13:08 2007] [notice] Accept mutex: sysvsem (Default: sysvsem)
[Sat Aug 18 06:03:53 2007] [error] [client 66.249.67.116] File does not exist: /var/www/html/robots.txt
[B][COLOR="Red"]-- About here is when the httpd service was restarted manually --[/COLOR][/B]
[Sat Aug 18 18:36:22 2007] [notice] caught SIGTERM, shutting down
[Sat Aug 18 18:36:28 2007] [notice] Apache/1.3.37 (Unix) mod_ssl/2.8.28 OpenSSL/0.9.7e PHP/4.4.7 mod_perl/1.29 FrontPage/5.0.2.2510 configured -- resuming normal operations
[Sat Aug 18 18:36:28 2007] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sat Aug 18 18:36:28 2007] [notice] Accept mutex: sysvsem (Default: sysvsem)
[Sat Aug 18 20:39:02 2007] [notice] SIGHUP received.  Attempting to restart
[Sat Aug 18 20:39:05 2007] [notice] Apache/1.3.37 (Unix) mod_ssl/2.8.28 OpenSSL/0.9.7e PHP/4.4.7 mod_perl/1.29 FrontPage/5.0.2.2510 configured -- resuming normal operations
[Sat Aug 18 20:39:05 2007] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sat Aug 18 20:39:05 2007] [notice] Accept mutex: sysvsem (Default: sysvsem)
[Sat Aug 18 20:41:01 2007] [notice] caught SIGTERM, shutting down
[Sat Aug 18 20:41:07 2007] [notice] Apache/1.3.37 (Unix) mod_ssl/2.8.28 OpenSSL/0.9.7e PHP/4.4.7 mod_perl/1.29 FrontPage/5.0.2.2510 configured -- resuming normal operations
[Sat Aug 18 20:41:07 2007] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sat Aug 18 20:41:07 2007] [notice] Accept mutex: sysvsem (Default: sysvsem)
[Sat Aug 18 20:48:01 2007] [notice] caught SIGTERM, shutting down
[Sat Aug 18 20:48:06 2007] [notice] Apache/1.3.37 (Unix) mod_ssl/2.8.28 OpenSSL/0.9.7e PHP/4.4.7 mod_perl/1.29 FrontPage/5.0.2.2510 configured -- resuming normal operations
[Sat Aug 18 20:48:06 2007] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sat Aug 18 20:48:06 2007] [notice] Accept mutex: sysvsem (Default: sysvsem)


P.S This hanging has only been occurring in the past couple of days.
I am using Debian 3.1
 
Last edited:
When trying to restart I get this error:
Starting httpd: Syntax error on line 19 of /etc/httpd/conf/httpd.conf:
API module structure 'php5_module' in file /usr/lib/apache/libphp5.so is garbled - expected signature 41503230 but saw 41503232 - perhaps this is not an Apache module DSO, or was compiled for a different Apache version?

Can anyone help me out?
Thanks
 
kobe, try to rebuild PHP5.
I believe my partner ended up doing a fresh install. He said it started but now it's not up.

I am trying to reboot but I still can't get httpd to start.

You suggest a rebuild?
 
Yes, do this:
Code:
cd /usr/local/directadmin/custombuild
./build clean
./build php n
 
My partner said there is an issue with php_admin_flag?
So I should rebuild and then see what happens (remember he just reinstalled)?

And all of the errors are coming from /usr/local/directadmin/data/users:
Syntax error on line 30 of /usr/local/directadmin/data/users/admin/httpd.conf:
Invalid command 'php_admin_flag', perhaps misspelled or defined by a module not included in the server configuration
 
Last edited:
OK, i ran the rebuild and get this error:

*** There was an error while trying to configure php. Check the configure/ap2/configure.php5 file
 
And few lines before this error? Try to execute "./build update" before the other commands.
 
new error when building PHP5


ext/mysqli/.libs/mysqli_nonapi.o(.text+0xade): In function `zif_mysqli_get_charset':
/usr/local/directadmin/custombuild/php-5.2.5/ext/mysqli/mysqli_nonapi.c:372: undefined reference to `mysql_get_character_set_info'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
 
Last edited:
okay this is....

this is the complete error a few lines above......please help.....

ext/mysqli/.libs/mysqli_nonapi.o(.text+0xade): In function `zif_mysqli_get_charset':
/usr/local/directadmin/custombuild/php-5.2.5/ext/mysqli/mysqli_nonapi.c:372: undefined reference to `mysql_get_character_set_info'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1

*** The make has failed, do you want to try to make again? (y,n):
 
Back
Top