Nginx and PHP-FPM Configuration and Optimizing Tips and Tricks - Comment Page: 6

I wrote before a guide Howto install Nginx/PHP-FPM on Fedora 28/27, CentOS/RHEL 7.4/6.9, but this guide is just installation guide and many cases Nginx and PHP-FPM basic configuration is good enough, but if you want to squeeze all the juice out of your VPS or web server / servers and do your maintenance work little bit easier, then this guide might be useful. These tips are based entirely on my own experience, so they may not be an absolute truth, and in some situations, a completely different configuration may work better. It's also good to remember leave resources for another services also if you run example, MySQL, PostgreSQL, MongoDB, Mail server, Name server and/or SSH server on same...

160 comments on “Nginx and PHP-FPM Configuration and Optimizing Tips and Tricks - Comment Page: 6

1 4 5 6
    1. If i have a 10 K concurrent user , and 8 core server process .. request size is about 4 KB , and response size is about 20 KB ,

      what is the best configuration should i use .. and please how I could calculate values based on requests per server ( with nginx load balancer ) , cores and ram size

    2. fastcgi_pass;
      #fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;

      If php-fpm and nginx are the same box, it might be better to use the socket approach (better performance, no tcp overhead)

    3. pm.start_servers = 3
      pm.min_spare_servers = 2

      does not make sense

    4. Thanks for Gre8 and useful information.

    5. hey,
      im experiencing Very hige cpu load,
      i have 16Gb of ram and 6cpus ,
      but everytime i have high traffic on my site some of the pages get nginx error 500

      • Hi Zion,

        Could you tell more how much traffic you have, what configs you are using and do you run some custom site? And what cause high cpu load, nginx or php-fpm?

    6. Hi We have 10 GB data to be synchronized between moodle and wordpress. When I try to synchronize, it shows error: 504 Bad Gateway TimeOut. Please guide. What should be memory parameters in nginx and php-fpm.

      • Hi GAURAV,

        What method you are using to synchronize this data? It sounds like a really long and heavy operation over the HTTP protocol. Is it possible run on server (using php-cli)?

1 4 5 6

Leave a Reply

Your email address will not be published. Required fields are marked *