logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

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.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Server ran out of threads to serve requests ?
Author
swapnilsshete



Joined: 17 Oct 2016
Posts: 9
Location: Pune

PostPosted: Mon 17 Oct '16 13:06    Post subject: Server ran out of threads to serve requests ? Reply with quote

Admin note: split, was not fitting subject.

Hi,

I have below error :

mpm_winnt:error AH00326: Server ran out of threads to serve requests. Consider raising the ThreadsPerChild setting

we have hide all below settings

#EnableMMAP off
#EnableSendfile off
#Include conf/extra/httpd-mpm.conf in apache conf file

I have mentioned below code in top of the conf file

AcceptFilter http none
AcceptFilter https none

This was worked. Server working fine but now days again this issue is started.

Still I am getting the above error. Can you please help me what is the exact problem ?
( Apache/2.4.18 (Win32) PHP/5.4.45 )



Thanks,
Swapnil
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3093
Location: Hilversum, NL, EU

PostPosted: Tue 18 Oct '16 13:29    Post subject: Reply with quote

swapnilsshete wrote:
I have below error :

mpm_winnt:error AH00326: Server ran out of threads to serve requests. Consider raising the ThreadsPerChild setting


Did you tried to raise the setting ?

Maybe you have more traffic ?
Back to top
swapnilsshete



Joined: 17 Oct 2016
Posts: 9
Location: Pune

PostPosted: Fri 21 Oct '16 10:37    Post subject: Reply with quote

I have uncomment the below line
Include conf/extra/httpd-mpm.conf

But still this gives me same error. May I know how can I check traffic. Because we developed this new and few users are check and working on this site.

Can you please help me on this?

Thanks,
Swapnil
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3093
Location: Hilversum, NL, EU

PostPosted: Fri 21 Oct '16 10:44    Post subject: Reply with quote

Again: did you raise the setting ?

Default it is 150
Back to top
swapnilsshete



Joined: 17 Oct 2016
Posts: 9
Location: Pune

PostPosted: Fri 28 Oct '16 12:41    Post subject: Reply with quote

Steffen wrote:
Again: did you raise the setting ?

Default it is 150


please check my configuration :

Admin note, config moved to http://apaste.info/5Pr8M


Please check and let me know what shall I do?

Thanks,
Swapnil
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3093
Location: Hilversum, NL, EU

PostPosted: Fri 28 Oct '16 12:50    Post subject: Reply with quote

You did not raise the setting.
Back to top
swapnilsshete



Joined: 17 Oct 2016
Posts: 9
Location: Pune

PostPosted: Wed 16 Nov '16 8:55    Post subject: Reply with quote

Steffen wrote:
You did not raise the setting.


Can you please help how to raise the setting ?

This help me a lot.

Thanks,
Swapnil
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Sat 19 Nov '16 10:05    Post subject: Reply with quote

at the moment you have

<IfModule mpm_winnt_module>
ThreadsPerChild 150
MaxRequestsPerChild 0
</IfModule>

you simply increase that number Wink and don't forget to restart apache.
Back to top
swapnilsshete



Joined: 17 Oct 2016
Posts: 9
Location: Pune

PostPosted: Wed 23 Nov '16 12:09    Post subject: Reply with quote

Thanks for your help James.

I have added below code in httpd.conf files and restart Apache
<IfModule mpm_winnt_module>
ThreadsPerChild 150
MaxConnectionsPerChild 0
</IfModule>


This gives me error : 'Error establishing a database connection' .

I have added config file details.Please check below :

Note : Hide ServerAdmin and ServerName (****)

********************************************
AcceptFilter http none
AcceptFilter https none


Admin note:

Conf moved to http://apaste.info/hOKDo

For the second time now, Please read the forum rules, next time we just delte it.



Can you please assist me on this.

Thanks,
Swapnil
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Sat 26 Nov '16 10:46    Post subject: Reply with quote

swapnilsshete wrote:


This gives me error : 'Error establishing a database connection' .


That is not an apache problem, but your database needs a tuning.
Back to top
swapnilsshete



Joined: 17 Oct 2016
Posts: 9
Location: Pune

PostPosted: Mon 28 Nov '16 12:04    Post subject: Reply with quote

Yes this is not apache problem, I have tested this once again. This is connected and after some period of time it gives me the same error 'Error establishing a database connection' and when I refresh that page it is load fine.

This scenario is continue.

I am stuck and I have thanks to you for your help.

Can you please help me on this scenario.

Thanks,
Swapnil
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Tue 29 Nov '16 15:55    Post subject: Reply with quote

What kind of databse are you using?
Back to top
swapnilsshete



Joined: 17 Oct 2016
Posts: 9
Location: Pune

PostPosted: Fri 02 Dec '16 13:06    Post subject: Reply with quote

James Blond wrote:
What kind of databse are you using?


Please check below details

Software: MySQL
Software version: 5.5.24 - MySQL Community Server (GPL)
Protocol version: 10
User: root@localhost
Server charset: UTF-8 Unicode (utf8)

Web Server :
Apache/2.4.18 (Win32) PHP/5.4.45
PHP extension: mysql

Thanks,
Swapnil
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Sat 10 Dec '16 13:08    Post subject: Reply with quote

Please post the setting from your my.ini and or my.cnf on http://pastebin.com/ and give us the link.
Back to top
swapnilsshete



Joined: 17 Oct 2016
Posts: 9
Location: Pune

PostPosted: Wed 14 Dec '16 9:45    Post subject: Reply with quote

James Blond wrote:
Please post the setting from your my.ini and or my.cnf on http://pastebin.com/ and give us the link.


I have posted configration. Please check below link
http://pastebin.com/trmwXBEi

Can you assist us on this.

Thanks,
Swapnil
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Thu 22 Dec '16 21:45    Post subject: Reply with quote

in your mysql config file

use query cache!

like
Code:
query_cache_type = ON
query_cache_limit       = 256M
query_cache_size        = 256M
join_buffer_size        = 8M
Back to top
swapnilsshete



Joined: 17 Oct 2016
Posts: 9
Location: Pune

PostPosted: Tue 27 Dec '16 8:09    Post subject: Reply with quote

Hi James,

Thanks for your help.

We rebooted our main server before 2 weeks ago. It is running smoothly. but now day (this week) when I have checked in middle of day it is taking some time to open.


As per your suggestion, I have added this in mysql config file (27 DEC 2016) and then restarted mySQL and Apache server.

I will keep watching on this.

I will let you know if anything is observed .

Thanks,
Swapnil
Back to top


Reply to topic   Topic: Server ran out of threads to serve requests ? View previous topic :: View next topic
Post new topic   Forum Index -> Apache