Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Apache Webserver mpm_winnt worker threads reaching maximum. |
|
Author |
|
anil4376
Joined: 03 Aug 2017 Posts: 2 Location: United Kingdom, London
|
Posted: Mon 21 Aug '17 18:15 Post subject: Apache Webserver mpm_winnt worker threads reaching maximum. |
|
|
Hi All,
We Implemented few web services which are deployed in a weblogic. and we are using Apache webserver as a WAF component which sits before my application and protects from external attacks like SQL Injection, XSS, BOM etc...
web server deployed in windows and application is deployed in weblogic which is hosted in AIX.
In my webserver I configured mpm_winnt module with 150 threads. but some time we are seeing issues like my worker threads reaching to maximum number i.e. 150. where we have to restart our webserver to fix this problem.
I am not sure is anything wrong in my conf or from server side.. and does any one know why exactly webserver hold the threads even the activity completes.
Here is the component list what we are using in apache web server.
AH01876: mod_ssl/2.4.16 compiled against Server: Apache/2.4.16, Library: OpenSSL/1.0.2d
AH01566: using ip addr 221.121.123.432
ModSecurity for Apache/2.9.0 (http://www.modsecurity.org/) configured.
ModSecurity: APR compiled version="1.5.2"; loaded version="1.5.2"
ModSecurity: PCRE compiled version="8.37 "; loaded version="8.37 2015-04-28"
ModSecurity: LUA compiled version="Lua 5.1"
ModSecurity: YAJL compiled version="2.1.0"
ModSecurity: LIBXML compiled version="2.9.2"
ModSecurity: Status engine is currently disabled, enable it by set SecStatusEngine to On.
mod_weblogic: init_mod: mpm is threaded.
AH01873: Init: Session Cache is not configured [hint: SSLSessionCache
AH01887: Init: Initializing (virtual) servers for SSL
AH01876: mod_ssl/2.4.16 compiled against Server: Apache/2.4.16, Library: OpenSSL/1.0.2d
AH01566: using ip addr 221.121.123.432
AH00455: Apache/2.4.16 (Win64) OpenSSL/1.0.2d configured -- resuming normal operations
AH00456: Apache Lounge VC14 Server built: Jul 22 2015 13:24:19
AH00094: Command line: 'v:\\Apache24\\bin\\httpd.exe -d v:/Apache24'
AH00418: Parent: Created child process 1234
AH01887: Init: Initializing (virtual) servers for SSL
AH01876: mod_ssl/2.4.16 compiled against Server: Apache/2.4.16, Library: OpenSSL/1.0.2d
AH01566: using ip addr 221.121.123.432
ModSecurity for Apache/2.9.0 (http://www.modsecurity.org/) configured.
ModSecurity: APR compiled version="1.5.2"; loaded version="1.5.2"
ModSecurity: PCRE compiled version="8.37 "; loaded version="8.37 2015-04-28"
ModSecurity: LUA compiled version="Lua 5.1"
ModSecurity: YAJL compiled version="2.1.0"
ModSecurity: LIBXML compiled version="2.9.2"
ModSecurity: Status engine is currently disabled, enable it by set SecStatusEngine to On.
mod_weblogic: init_mod: mpm is threaded.
AH01873: Init: Session Cache is not configured [hint: SSLSessionCache
AH01887: Init: Initializing (virtual) servers for SSL
AH01876: mod_ssl/2.4.16 compiled against Server: Apache/2.4.16, Library: OpenSSL/1.0.2d
AH01566: using ip addr 221.121.123.432
WebLogic Server Plugin version 12.1.3 <WLSPLUGINS_12.1.3.0.0_WINDOWS.X64_140429.1806>
AH00354: Child: Starting 150 worker threads.
it is happening frequently in my production. |
|
Back to top |
|
Qmpeltaty
Joined: 06 Feb 2008 Posts: 182 Location: Poland
|
Posted: Tue 22 Aug '17 14:55 Post subject: |
|
|
Add this lines to your httpd.conf:
Code: | HostnameLookups Off
KeepAlive On
KeepAliveTimeout 1
MaxKeepAliveRequests 200
Timeout 15
ThreadsPerChild 300 ---> this will raise threads
MaxRequestsPerChild 0
|
If you need more than 1920 threads you have to use ThreadLimit directive f.x. ThreadLimit 15000, and then you could increase ThreadsPerChild above 1920. |
|
Back to top |
|
anil4376
Joined: 03 Aug 2017 Posts: 2 Location: United Kingdom, London
|
Posted: Tue 22 Aug '17 18:14 Post subject: |
|
|
Thanks for your response..
I already have these values in my httpd.conf file
HostnameLookups - no such property.
KeepAlive On
KeepAliveTimeout 90
MaxKeepAliveRequests 0
Timeout 300
####### we are using mpm_winnt module ########
ThreadsPerChild 150
MaxRequestsPerChild 0
Now I will make the suggested changes and try. but
I want to highlight our observation.. i.e. we are seeing this worker thread count hike happens in the span of 15 to 20 min and the load on the server during that time is not so much.
Thanks
Anil |
|
Back to top |
|
Qmpeltaty
Joined: 06 Feb 2008 Posts: 182 Location: Poland
|
Posted: Wed 23 Aug '17 14:46 Post subject: |
|
|
anil4376 wrote: |
Now I will make the suggested changes and try. but
I want to highlight our observation.. i.e. we are seeing this worker thread count hike happens in the span of 15 to 20 min and the load on the server during that time is not so much.
|
It's because connection is kept by webserver for 90 seconds.
Decrease the KeepAliveTimeout.
Quote: |
The number of seconds Apache httpd will wait for a subsequent request before closing the connection. By adding a postfix of ms the timeout can be also set in milliseconds. Once a request has been received, the timeout value specified by the Timeout directive applies.
Setting KeepAliveTimeout to a high value may cause performance problems in heavily loaded servers. The higher the timeout, the more server processes will be kept occupied waiting on connections with idle clients. |
|
|
Back to top |
|
|
|
|
|
|