Author |
|
swapnilsshete
Joined: 17 Oct 2016 Posts: 9 Location: Pune
|
Posted: Mon 17 Oct '16 13:06 Post subject: Server ran out of threads to serve requests ? |
|
|
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
|
Posted: Tue 18 Oct '16 13:29 Post subject: |
|
|
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
|
Posted: Fri 21 Oct '16 10:37 Post subject: |
|
|
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
|
Posted: Fri 21 Oct '16 10:44 Post subject: |
|
|
Again: did you raise the setting ?
Default it is 150 |
|
Back to top |
|
swapnilsshete
Joined: 17 Oct 2016 Posts: 9 Location: Pune
|
Posted: Fri 28 Oct '16 12:41 Post subject: |
|
|
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
|
Posted: Fri 28 Oct '16 12:50 Post subject: |
|
|
You did not raise the setting. |
|
Back to top |
|
swapnilsshete
Joined: 17 Oct 2016 Posts: 9 Location: Pune
|
Posted: Wed 16 Nov '16 8:55 Post subject: |
|
|
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
|
Posted: Sat 19 Nov '16 10:05 Post subject: |
|
|
at the moment you have
<IfModule mpm_winnt_module>
ThreadsPerChild 150
MaxRequestsPerChild 0
</IfModule>
you simply increase that number and don't forget to restart apache. |
|
Back to top |
|
swapnilsshete
Joined: 17 Oct 2016 Posts: 9 Location: Pune
|
Posted: Wed 23 Nov '16 12:09 Post subject: |
|
|
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
|
Posted: Sat 26 Nov '16 10:46 Post subject: |
|
|
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
|
Posted: Mon 28 Nov '16 12:04 Post subject: |
|
|
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
|
Posted: Tue 29 Nov '16 15:55 Post subject: |
|
|
What kind of databse are you using? |
|
Back to top |
|
swapnilsshete
Joined: 17 Oct 2016 Posts: 9 Location: Pune
|
Posted: Fri 02 Dec '16 13:06 Post subject: |
|
|
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
|
Posted: Sat 10 Dec '16 13:08 Post subject: |
|
|
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
|
Posted: Wed 14 Dec '16 9:45 Post subject: |
|
|
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
|
Posted: Thu 22 Dec '16 21:45 Post subject: |
|
|
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
|
Posted: Tue 27 Dec '16 8:09 Post subject: |
|
|
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 |
|