Server is within MinSpareThreads of MaxRequestWorkers, consider raising the MaxRequestWorkers setting

ksgalicia

Well-Known Member
Aug 4, 2016
66
5
8
Spain
cPanel Access Level
Root Administrator
Twitter
Hello!

Checking the Apache logs of a VPS server with 32 GB RAM and 8-core processor, I find this:

[Fri Mar 26 07:35:23.082590 2021] [mpm_worker:error] [pid 789:tid 47280170771520] AH00287: server is within MinSpareThreads of MaxRequestWorkers, consider raising the MaxRequestWorkers setting
[Fri Mar 26 07:37:50.536138 2021] [proxy_fcgi:error] [pid 12507:tid 47280510383872] (70007)The timeout specified has expired: [client 147.135.194.103:58674] AH01075: Error dispatching request to : (polling)


To what is due? How the problem is solved?

Every time this happens I have to restart Apache.

Thanks!
 

kodeslogic

Well-Known Member
Apr 26, 2020
259
85
103
IN
cPanel Access Level
Root Administrator
  • Like
Reactions: cPRex

ksgalicia

Well-Known Member
Aug 4, 2016
66
5
8
Spain
cPanel Access Level
Root Administrator
Twitter
These are the default values of the Apache configuration:
  • Start Servers: 5
  • Minimum Spare Servers: 5
  • Maximum Spare Servers: 5
  • Server Limit: 256
  • Max Request Workers: 150
  • Max Connections Per Child: 100000
  • Keep-Alive: On
  • Keep-Alive Timeout: 5
  • Max Keep-Alive Requests: 100
  • Timeout: 300
What are the recommended values or is there a tool to calculate the recommended values according to the VPS server processor and memory?

Thanks!
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
4,836
597
273
cPanel Access Level
Root Administrator
There are no tools that will accurately give you the settings based on the server's hardware, as it also depends on the site content and traffic as well. You can increase the MaxRequestWorkers value to 200 to see if that keeps you from getting these warnings in the log.
 

kodeslogic

Well-Known Member
Apr 26, 2020
259
85
103
IN
cPanel Access Level
Root Administrator
You need to keep MaxRequestWorkers value less than the value set for ServerLimit. So you if you're planning to raise the MaxRequestWorkers value greater than the current ServerLimit then you should also adjust the ServerLimit value to be greater than MaxRequestWorkers whatever you set.
 
  • Like
Reactions: cPRex