Re: Help! My apache httpd server cannot close thread

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sunday 17 February 2008 20:02, 赵志桐 wrote:
> hello everybody
>
> My web server got a problem long time.
>
> It's cannot close finished httpd thread, i used "ps -e" to check server
> got a lot of httpd thread like following:
>
> 20292 ? 00:00:01 httpd
> 4912 ? 00:00:00 cronolog
> 4913 ? 00:00:00 cronolog
> 4914 ? 00:00:00 cronolog
> 4915 ? 00:00:00 cronolog
> 4916 ? 00:00:00 cronolog
> 4917 ? 00:00:00 cronolog
> 4918 ? 00:00:00 cronolog
> 4919 ? 00:00:00 httpd
> 4921 ? 00:00:00 httpd
> 4922 ? 00:00:01 java
> 4938 ? 00:00:02 httpd
> 4939 ? 00:00:03 httpd
> 4940 ? 00:00:00 httpd
> 4941 ? 00:00:00 httpd
> 4942 ? 00:00:00 httpd
> 4944 ? 00:00:01 httpd
> 4970 ? 00:00:00 httpd
> 4971 ? 00:00:02 httpd
> 4972 ? 00:00:02 httpd
> 4973 ? 00:00:00 httpd
> 4974 ? 00:00:00 httpd
> 4975 ? 00:00:00 httpd
> 4976 ? 00:00:00 httpd
> 4977 ? 00:00:00 httpd
> 4978 ? 00:00:00 httpd
> 4979 ? 00:00:00 httpd
> 4980 ? 00:00:00 httpd
> 4981 ? 00:00:00 httpd
> 4982 ? 00:00:00 httpd
> 4983 ? 00:00:00 httpd
> 4984 ? 00:00:00 httpd
> 4990 ? 00:00:00 httpd
> 4991 ? 00:00:00 httpd
> 4992 ? 00:00:00 httpd
> 4993 ? 00:00:00 httpd
> 4994 ? 00:00:00 httpd
> 4995 ? 00:00:00 httpd
> 4996 ? 00:00:00 httpd
> 5070 ? 00:00:00 httpd
> 5071 ? 00:00:00 httpd
> 5072 ? 00:00:00 httpd
> 5073 ? 00:00:00 httpd
> 5074 ? 00:00:00 httpd
> 5075 ? 00:00:00 httpd
> 5076 ? 00:00:00 httpd
> 5078 ? 00:00:00 httpd
> 5079 ? 00:00:01 httpd
> 5080 ? 00:00:00 httpd
> 5081 ? 00:00:00 httpd
> 5082 ? 00:00:00 httpd
> 5083 ? 00:00:00 httpd
> 5084 ? 00:00:00 httpd
> 5150 ? 00:00:00 httpd
> 5151 ? 00:00:00 httpd
> 5152 ? 00:00:00 httpd
> 5153 ? 00:00:00 httpd
> 5154 ? 00:00:00 httpd
> 5155 ? 00:00:00 httpd
> 5156 ? 00:00:00 httpd
> 5187 ? 00:00:00 httpd
> 5188 ? 00:00:00 httpd
> 5189 ? 00:00:00 httpd
> 5190 ? 00:00:00 httpd
> 5191 ? 00:00:00 httpd
> 5192 ? 00:00:00 httpd
> 5193 ? 00:00:00 httpd
> 8691 ? 00:00:00 httpd
> 8692 ? 00:00:01 httpd
> 8693 ? 00:00:01 httpd
> 8694 ? 00:00:00 httpd
> 8695 ? 00:00:00 httpd
> 8696 ? 00:00:00 httpd
> 8697 ? 00:00:00 httpd
> 8698 ? 00:00:00 httpd
> ...
>
> This server used PHP5.24 and Apache/2.0.63
>
> the website write by PHP with mod_rewrite
>
> I have another server that environment same this one but haven't this
> problem.
>
> following is my server environment information:
>
> OS: Suse Linux 10
> Web: PHP5.24 and Apache/2.0.63
>
> The attachments is my httpd.conf and virtualhost.conf
>
> please help fix it , thanks a lot.

In your config:

<IfModule prefork.c>
StartServers         5
MinSpareServers      5
MaxSpareServers     10
MaxClients         150
MaxRequestsPerChild  0
</IfModule>

# worker MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule worker.c>
StartServers         2
MaxClients         150
MinSpareThreads     25
MaxSpareThreads     75 
ThreadsPerChild     25
MaxRequestsPerChild  0
</IfModule>

# perchild MPM
# NumServers: constant number of server processes
# StartThreads: initial number of worker threads in each server process
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# MaxThreadsPerChild: maximum number of worker threads in each server process
# MaxRequestsPerChild: maximum number of connections per server process
<IfModule perchild.c>
NumServers           5
StartThreads         5
MinSpareThreads      5
MaxSpareThreads     10
MaxThreadsPerChild  20
MaxRequestsPerChild  0
</IfModule>

That, in my opinion, is an insane amount of spare threads to have. Do you 
really need 25-75 spare threads for your workers?

---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux