Hi Team,
I am having two applications (1 java and 1 php). Both applications using same mysql database server. There are some configuration settings are done in apache and mysql. For java application there are hardly 5 users using the application. PHP site used by visitors.
In PHP, for every query execution DB connection is opened and closed. mysqli () and mysqli_close();
Also enabled general log.
I also have enabled httpd-mpm. 150 changed to 64. <IfModule mpm_winnt_module> ThreadsPerChild 64 MaxConnectionsPerChild 0 </IfModule>
and <IfModule mpm_netware_module> ThreadStackSize 65536 StartThreads 250 MinSpareThreads 25 MaxSpareThreads 250 MaxThreads 1000 MaxConnectionsPerChild 0 </IfModule>
I checked the status using show status like '%onn%'; and show status like '%thread%';
The connections value goes beyond 8500, Threads created 5342 and threads running 1001.
And all applications stops working
I checked apache error log:
[mpm_winnt:error] [pid 9632:tid 2196] AH00326: Server ran out of threads to serve requests. Consider raising the ThreadsPerChild setting
[mpm_winnt:notice] [pid 9632:tid 460] AH00364: Child: All worker threads have exited.
I guess there are some configuration changes that I need to do. But not getting any idea.
Could you please help me. I am searching for solution from last couple of weeks.
Sorry,but I have absolutely no idea what it would need to be.
And I don’t know what possible impact there might be in other areas by upping it.
But seeing as the message said to consider doing it, I think doing so a sane amount should be safe.
i.e. I wouldn’t jump straight away to 99999999999999 or anything like that.
I guess to be safe you should wait until someone that has experience with changing it chimes in.
If you’re impatient I think doubling it would be a safe start.
Then if things fail again be sure to scrutinize the log’s numbers for clues as to how much of a difference the change made, if any.