How to fix php-fpm overloading
Started by huuthi95

Rate this topic
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

0 posts in this topic
Junior Member

26 posts 21 threads Joined: Jul 2019
27-08-2019, 09:33 -
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

Forum Jump:

Users browsing this thread: 1 Guest(s)

MyBB SQL Error

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1017 - Can't find file: './lnbhosti_mybb47/mybbi8_threadviews.MYI' (errno: 2 "No such file or directory")
INSERT INTO mybbi8_threadviews (tid) VALUES('66')