You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by meer <s....@gmail.com> on 2007/08/10 11:02:58 UTC
[users@httpd] Apache spawns hundreds of processes, logging problem?
Hello,
I am really desperated with my problem...
What i have is Apache 2.2.3-5, PHP 4.4.4-9 on Debian lenny, dual Xeon
3.2GHz, SCSI drives.
The problem:
Normally, there are about 40-60 Apache processes and everything works
fine. Then, in a minute, Apache spawns hundreds of processes (e.g. from
50 to 900) and most of them are waiting for an access to log file (*1).
There's no any strange traffic, access logs don't show anything special
(normal number of requests).
Firstly, I thought it was some sort of DOS attack and installed
mod_evasive but all I got was one more strange observation: while
normally mod_evasive logs DOS attempts, there's no single entry in it's
log from the time when Apache goes mad.
This, and the (*1) fact make me think, that's a logging problem. Log
partition is NOT full, but I noticed, that Apache logs stopped rotating.
Is there any known issue like this? I'm fairly sure logs are involved
but that's all I was able to figure out.
List of enabled Apache modules (ls from mods-enabled):
actions.load
alias.load
auth_basic.load
authn_file.load
authz_default.load
authz_groupfile.load
authz_host.load
authz_user.load
autoindex.load
cgi.load
dir.load
env.load
evasive.load
ext_filter.load
mime.load
negotiation.load
php4.load
rewrite.load
setenvif.load
ssl.load
status.load
--
Best regards,
meer
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Re: Apache spawns hundreds of processes, logging problem?
Posted by Vincent Bray <no...@gmail.com>.
On 13/08/07, meer <s....@gmail.com> wrote:
> Vincent Bray napisał(a):
> > What are you using for the log rotation? In case it's a disk error,
> > check your /var/log/messages for the time the problem's occuring?
>
> Apache logs are rotated by system's logrotate daemon and there are no
> interesting entries in /var/log/messages.
logrotate typically sends the server -HUP, meaning 'restart', rather
than -USR1 meaning 'gracefully restart'. The difference being that the
former kills existing connections and the later doesn't. In both cases
the parent process isn't restarted. However it isn't clear that this
issue has anything to do with log rotation.. Does the problem happen
while the logs are being rotated?
Assuming that the restart is failing somehow, try watching the blocked
processes using strace, or your system's equivalent.
http://httpd.apache.org/dev/debugging.html
> To be completely honest, I don't really know what to do in this
> situation... the system was always fully functional and now It acts like
> this. I applied an connlimit to the firewall but it didn't work also.
What gave you the impression that the processes were blocked waiting
on the logging phase? Can you post strace output?
--
noodl
[users@httpd] Re: Apache spawns hundreds of processes, logging problem?
Posted by meer <s....@gmail.com>.
Vincent Bray napisał(a):
> What are you using for the log rotation? In case it's a disk error,
> check your /var/log/messages for the time the problem's occuring?
Apache logs are rotated by system's logrotate daemon and there are no
interesting entries in /var/log/messages.
> Apache logs requests as the final stage of processing, and any
> blockage here will lead to the process build up you're seeing.
> Requests will still get services, but only until you either run out of
> memory or hit MaxClient (which should happen first if the value is set
> correctly).
To be completely honest, I don't really know what to do in this
situation... the system was always fully functional and now It acts like
this. I applied an connlimit to the firewall but it didn't work also.
--
meer
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
[users@httpd] Re: Apache spawns hundreds of processes, logging problem?
Posted by meer <s....@gmail.com>.
Vincent Bray napisał(a):
> What are you using for the log rotation? In case it's a disk error,
> check your /var/log/messages for the time the problem's occuring?
Apache logs are rotated by system's logrotate daemon and there are no
interesting entries in /var/log/messages.
> Apache logs requests as the final stage of processing, and any
> blockage here will lead to the process build up you're seeing.
> Requests will still get services, but only until you either run out of
> memory or hit MaxClient (which should happen first if the value is set
> correctly).
To be completely honest, I don't really know what to do in this
situation... the system was always fully functional and now It acts like
this. I applied an connlimit to the firewall but it didn't work also.
--
meer
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Apache spawns hundreds of processes, logging problem?
Posted by Vincent Bray <no...@gmail.com>.
On 10/08/07, meer <s....@gmail.com> wrote:
> The problem:
[snip]
> This, and the (*1) fact make me think, that's a logging problem. Log
> partition is NOT full, but I noticed, that Apache logs stopped rotating.
What are you using for the log rotation? In case it's a disk error,
check your /var/log/messages for the time the problem's occuring?
Apache logs requests as the final stage of processing, and any
blockage here will lead to the process build up you're seeing.
Requests will still get services, but only until you either run out of
memory or hit MaxClient (which should happen first if the value is set
correctly).
--
noodl
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] huge config file & e404 page on different server
Posted by Samuel Vogel <sa...@gmx.de>.
> Well, my guess is that the performance hit from using mod_cband (which
> needs to lock/read/write a text database on every request) is
> significantly bigger than the performance hit from simply adding a
> vhost section.
>
Is mod_cband really that big of a performance hit?
> ErrorDocument 404 /errors/404.html
> ProxyPass /errors/404.html http://othersite.example.com/errors/404.html
>
Thanks!
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] huge config file & e404 page on different server
Posted by Joshua Slive <jo...@slive.ca>.
On 8/10/07, Samuel Vogel <sa...@gmx.de> wrote:
> Hey,
> > It will make startup and restarts slower and will increase the memory
> > usage somewhat. There will also be some effect on run-time
> > performance, but it probably won't be too big.
> >
> > What exactly is it about the vhost config that is too complicated for
> > dynamic vhosts? Some things can be worked around using mod_rewrite
> > instead of mod_vhost_alias.
> >
> I use mod_cband and also have to set some php options...
Well, my guess is that the performance hit from using mod_cband (which
needs to lock/read/write a text database on every request) is
significantly bigger than the performance hit from simply adding a
vhost section.
>
> > That's because if the error page isn't on the same server that
> > actually has the error, the server must send a redirect to the client.
> > Therefore if you want to deliver the proper response code, the error
> > page must be in the namespace of the server with the error. If that is
> > a problem, you can use ProxyPass to bring a document from the Master
> > Server into the namespace of the other servers.
> What do you mean by namespace? The Error document is not on the same
> server but under the same domain.
If the server is going to deliver the error text without a redirect,
the error text must be available on the same server.
> How would I use ProxyPass specifically to do this?
ErrorDocument 404 /errors/404.html
ProxyPass /errors/404.html http://othersite.example.com/errors/404.html
Joshua.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] huge config file & e404 page on different server
Posted by Samuel Vogel <sa...@gmx.de>.
Hey,
> It will make startup and restarts slower and will increase the memory
> usage somewhat. There will also be some effect on run-time
> performance, but it probably won't be too big.
>
> What exactly is it about the vhost config that is too complicated for
> dynamic vhosts? Some things can be worked around using mod_rewrite
> instead of mod_vhost_alias.
>
I use mod_cband and also have to set some php options...
> That's because if the error page isn't on the same server that
> actually has the error, the server must send a redirect to the client.
> Therefore if you want to deliver the proper response code, the error
> page must be in the namespace of the server with the error. If that is
> a problem, you can use ProxyPass to bring a document from the Master
> Server into the namespace of the other servers.
What do you mean by namespace? The Error document is not on the same
server but under the same domain.
How would I use ProxyPass specifically to do this?
Regards,
Samy
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] huge config file & e404 page on different server
Posted by Joshua Slive <jo...@slive.ca>.
On 8/10/07, Samuel Vogel <sa...@gmx.de> wrote:
> I have to questions regarding Apache:
>
> 1. With my setup I will have config files that are as big as 10mb, since
> I have complicated vhost config and 5000 vhosts. Will this slow Apache
> down significantly or have any other negative impact?
> The Problem is that the vhost config is to complicated for
> mod_vhost_alias...
It will make startup and restarts slower and will increase the memory
usage somewhat. There will also be some effect on run-time
performance, but it probably won't be too big.
What exactly is it about the vhost config that is too complicated for
dynamic vhosts? Some things can be worked around using mod_rewrite
instead of mod_vhost_alias.
>
> 2. I have 4 Servers. 3 of them to hold user content and one as a master
> server, which serves the startpage and login page etc. I would like to
> place my Error 404 document on the Master Server. But when I set the
> Error 404 to an http:// location pointing directly to my Error 404 page
> on master server. But this makes the page have status 200 and not 404
> anymore.
> How can I solve this problem?
That's because if the error page isn't on the same server that
actually has the error, the server must send a redirect to the client.
Therefore if you want to deliver the proper response code, the error
page must be in the namespace of the server with the error. If that is
a problem, you can use ProxyPass to bring a document from the Master
Server into the namespace of the other servers.
Joshua.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
[users@httpd] huge config file & e404 page on different server
Posted by Samuel Vogel <sa...@gmx.de>.
I have to questions regarding Apache:
1. With my setup I will have config files that are as big as 10mb, since
I have complicated vhost config and 5000 vhosts. Will this slow Apache
down significantly or have any other negative impact?
The Problem is that the vhost config is to complicated for
mod_vhost_alias...
2. I have 4 Servers. 3 of them to hold user content and one as a master
server, which serves the startpage and login page etc. I would like to
place my Error 404 document on the Master Server. But when I set the
Error 404 to an http:// location pointing directly to my Error 404 page
on master server. But this makes the page have status 200 and not 404
anymore.
How can I solve this problem?
Regards,
Samy
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org