arrow_upward

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to fix php-fpm overloading
#1
long time not making any tutorial . but i think now is the time

short background . recently my web backend for my android application exploded in popularity and because of that my vps cannot handle it . it starting to give error 500 , 520 , 502 , etc . after some finding i found out the cause to be the php-fpm that limit the processing power and make my site giving that error . i use php for backend simply because i dont know python,nodejs,etc

to fix it edit the www.conf file in /etc/php/{php version}/{apache or fpm(nginx)}/pool.d/www.conf . for example i use php7.0 and nginx so i use
nano /etc/php/7.0/fpm/pool.d/www.conf

now edit some variable on that www.conf file and find this variable and then change it like this
pm = dynamic
pm.max_children = 100
pm.start_servers = 100
pm.min_spare_servers = 25
pm.max_spare_servers = 100

and then find the pm.max_request and remove the ';'
pm.max_request = 500

now restart the php-fpm using
service php7.0-fpm restart (depend on what php version you are using)

and after that i get the error much less but still slowdown mostly because of the traffic . it not totally fix it for me but enough to be usable . hope you find this tutorial useful
Terminal
humanpuff69@FPAX:~$ Thanks To Shadow Hosting And Post4VPS for VPS 5


Messages In This Thread
How to fix php-fpm overloading - by humanpuff69 - 06-08-2019, 03:01 AM
RE: How to fix php-fpm overloading - by tryp4vps - 06-10-2019, 05:56 AM
RE: How to fix php-fpm overloading - by Mashiro - 06-10-2019, 10:59 AM
RE: How to fix php-fpm overloading - by rudra - 06-13-2019, 11:16 AM

person_pin_circle Users browsing this thread: 1 Guest(s)
Sponsors: VirMach - Host4Fun - CubeData - Evolution-Host - HostDare - Hyper Expert - Shadow Hosting - Bladenode - Hostlease - RackNerd - ReadyDedis - Limitless Hosting