0

I am using a Ubuntu 18.04 server for hosting a big WordPress site, this site gets max 2500 visitor per day. My issue is my site going down every few minutes and showing 504 Gateway Time-out error. I already increased timeout setting in nginx, php7.2-fpm config and when I run apachebuddy script it's suggesting me to increase MaxRequestWorkers to 16236, for only 20-30 live visitor why we need 16K MaxRequestWorkers?

Mi2
  • 13
  • 4

1 Answers1

0

The amount of MaxRequestWorkers highly depends on the amount of available memory you can spare for Apache. My guess is that you don't have that much memory and that your apachebuddy script is completely wrong (my Debian default setting is 150).

Have a look at these questions and answers to determine your MaxRequestWorkers setting:
- Reducing Apache Memory usage and Average Process Size Value
- Reduce number of Apache processes

Freddy
  • 1,999
  • 5
  • 12
  • Hi Freddy, memory calculation by apachebuddy is right, I have 32GB memory – Mi2 Apr 08 '19 at 22:24
  • And do you really want to have 16k worker threads enabled if you only have ~30 visitors? It might be better to spend some of it for other things like database, php, ramdisk etc. and leave some memory freely available. – Freddy Apr 08 '19 at 22:31
  • If the calculation was right, then one Apache process would need less than 2MB of memory with all workers active. This can't be. And there would be no memory left for os and other things. – Freddy Apr 08 '19 at 23:03