You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Borut Mrak <b...@aufbix.org> on 2003/05/29 14:22:10 UTC

[users@httpd] apache 2.0.x freezing when using perchild mpm

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The subject says it all...

At first I thought this is somehow related to PHP, but I commented out almost 
all of the modules, and it still happens on static content.

error log (LogLevel debug):

Lots of these (normal):
[Thu May 29 13:20:48 2003] [debug] perchild.c(1790): Determining if request 
should be passed. Child Num: 2, SD: 6, sd from table: 16, hostname from 
server: www3.example.com

And then:

[Thu May 29 13:20:48 2003] [debug] perchild.c(1799): Passing request.
[Thu May 29 13:20:48 2003] [debug] perchild.c(1655): passing request to 
another child.  Vhost: www3.example.com, child 2 7
[Thu May 29 13:20:48 2003] [debug] perchild.c(1707): Writing message to 7, 
passing sd:  22
[Thu May 29 13:20:48 2003] [debug] perchild.c(1717): Writing message succeeded 
49

- From here on httpd stops serving requests. It does not refuse connections, but 
there are no new log entries and it doesn't return anything. Running
ab -n 10 -c 1 http://www3.example.com/zeros.txt
(zeros.txt is 10K worth of zeros) from 1 to 3 times is enough to freeze the 
server, but the number of tries needed is not connected to *Threads* 
directives (I tried to fiddle with those to see if it has any effect).

What I've found out is that the server freezes as long as it is running under 
different UIDs. If it only runs as the default user (no ChildPerUserID 
directives), everything is fine. If ChildPerUserID # # = NumServers, 
everything is fine (no httpd processes running under the default UID).

MPM config:
<IfModule perchild.c>
NumServers           8
StartThreads         20
MinSpareThreads      5
MaxSpareThreads      20
MaxThreadsPerChild   20
MaxRequestsPerChild  0
ChildPerUserId #30000 #30000 2
</IfModule>

vhost config:
NameVirtualHost xx.xx.xx.xx:80
<VirtualHost xx.xx.xx.xx:80>
  ServerAdmin webmaster@example.com
  DocumentRoot /var/www/www3.example.com
  ServerName www3.example.com

  AssignUserID #30000 #30000
</VirtualHost>

Loaded modules:
LoadModule access_module modules/mod_access.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module modules/mod_mime.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so

(I could lose some of these, but didn't want to massacre the default config 
file by removing all the directives that need these modules - I could if 
anyone thinks it might help)

Other non-default settings:
AcceptMutex flock
(the default - sysvsem doesn't work - but that's a topic for another post)

My system:
Debian 3.0
Linux 2.4.21-pre5 (also tried earlier kernels, 2.4.18 and maybe some others, 
can't remember)
glibc 2.2.5-11.5
Apache 2.0.46 (also tried 45 and two or three older versions)

Httpd was configured like this:
./configure --prefix=/opt/apache-2.0.46 --bindir=/usr/local/bin/ 
- --sbindir=/usr/local/sbin/ --enable-mods-shared=all --with-mpm=perchild 
- --enable-ssl

Any ideas? I need mpm_perchild, otherwise I won't migrate this webserver to 
Apache 2.0 - yet. :-)

thanks,

- -- 
Borut Mrak, b@aufbix.org
PGP: finger b@aufbix.org
-----BEGIN PGP SIGNATURE-----

iD8DBQE+1ftyRUVvbWYRhIIRAiolAKDOmm1qzq6/Ni1Id6vqj+ztiqyXIACfQR4o
nHTkIRP96Bl3QgSOOxxrOUo=
=EbxX
-----END PGP SIGNATURE-----


---------------------------------------------------------------------
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