PDA

View Full Version : apache help (keeps dying)


LeeS
Thu 4th Sep '03, 7:26am
Due to a kernel panic problem our box recently had to be re-installed (Ensim, from RackShack). We had this problem partially, but nowhere near as bad before, where every couple of days to a week, the httpd would die and need to be restarted and the semaphores cleared out.

While I haven't had to touch the semaphores as yet, apache is dying as much as once every 45 minutes now. There is nothing 'wrong' with apache, it's a good, clean, ensim cd-rom restore that ran fine for 5 days during testing. Only when we released vB3 to the masses, did we start getting problems.

Our users are starting to get pissed with the continual down time, but I don't know what do to. Anyone?


Some stats:

Single P4 2.4GHz, 1024mb ram, 60gb hard disk (2x).
Apache 1.3.27, PHP 4.2.2, MySQL 3.23.56.
Usually around 200 people surfing at the same time.

Current my.cnf
---

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
tmpdir=/tmp
set-variable = max_connections=400
set-variable = key_buffer=16M
set-variable = myisam_sort_buffer_size=64M
set-variable = join_buffer=1M
set-variable = record_buffer=2M
set-variable = sort_buffer=2M
set-variable = table_cache=1024
set-variable = thread_cache_size=128
set-variable = wait_timeout=3600
set-variable = connect_timeout=10
set-variable = max_allowed_packet=16M
set-variable = max_connect_errors=10

[mysql.server]
user=mysql
basedir=/var/lib

[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

httpd.conf (pertinent parts)
---

KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MinSpareServers 5
MaxSpareServers 10
StartServers 5
MaxClients 150

rylin
Thu 4th Sep '03, 7:28am
What does the apache error log say when it dies?

LeeS
Thu 4th Sep '03, 7:41am
Oddly, not a lot. There is reference to a segmentation fault on one process, but that entry was over 2 hours old and unrelated to the crash. The next time it dies on us, I'll take an extract - but every time I've looked thus far (about 35% of the time) there didn't appear to be anything relevant (time wise)

LeeS
Thu 4th Sep '03, 7:42am
Strange ... couldn't reply there for a sec. Someone must be fiddling.
Parse error: parse error, unexpected T_STRING in /www/beta.jelsoft.com/htdocs/forum/newreply.php on line 244

LeeS
Thu 4th Sep '03, 8:28am
[root@dimension root]# tail /var/log/httpd/error_log
Processing config directory: /etc/httpd/conf/site1
Processing config file: /etc/httpd/conf/site1/cgi
Processing config file: /etc/httpd/conf/site1/weblogs
[Thu Sep 4 10:11:05 2003] [warn] pid file /var/run/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Thu Sep 4 10:11:05 2003] [notice] httpd_defines: enabled
[Thu Sep 4 10:11:05 2003] [notice] httpdmon: httpdmon_init
[Thu Sep 4 10:11:05 2003] [notice] bandwidth monitoring enabled (mapping file: /etc/virtualhosting/mappings/apache.domainmap)
[Thu Sep 4 10:11:05 2003] [notice] Apache/1.3.27 (Unix) (Red-Hat/Linux) mod_jk/1.2.0 mod_perl/1.26 PHP/4.2.2 FrontPage/5.0.2 mod_ssl/2.8.12 OpenSSL/0.9.6b configured -- resuming normal operations
[Thu Sep 4 10:11:05 2003] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Thu Sep 4 10:11:05 2003] [notice] Accept mutex: sysvsem (Default: sysvsem)

is the output from the last crash before apache is restarted

LeeS
Thu 4th Sep '03, 1:44pm
Anyone? :(

rylin
Thu 4th Sep '03, 1:46pm
Anyone? :(
does anything show up in /var/log/messages around that time?

LeeS
Thu 4th Sep '03, 4:47pm
A good point. Next time it goes, I'll have a look.

eva2000
Thu 4th Sep '03, 7:21pm
[root@dimension root]# tail /var/log/httpd/error_log
Processing config directory: /etc/httpd/conf/site1
Processing config file: /etc/httpd/conf/site1/cgi
Processing config file: /etc/httpd/conf/site1/weblogs
[Thu Sep 4 10:11:05 2003] [warn] pid file /var/run/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Thu Sep 4 10:11:05 2003] [notice] httpd_defines: enabled
[Thu Sep 4 10:11:05 2003] [notice] httpdmon: httpdmon_init
[Thu Sep 4 10:11:05 2003] [notice] bandwidth monitoring enabled (mapping file: /etc/virtualhosting/mappings/apache.domainmap)
[Thu Sep 4 10:11:05 2003] [notice] Apache/1.3.27 (Unix) (Red-Hat/Linux) mod_jk/1.2.0 mod_perl/1.26 PHP/4.2.2 FrontPage/5.0.2 mod_ssl/2.8.12 OpenSSL/0.9.6b configured -- resuming normal operations
[Thu Sep 4 10:11:05 2003] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Thu Sep 4 10:11:05 2003] [notice] Accept mutex: sysvsem (Default: sysvsem)

is the output from the last crash before apache is restarted
tried updating to Apache 1.3.28 ?