Skip to main content

php-fpm pool processes causing high load

Comments

12 comments

  • cPRex Jurassic Moderator
    Hey there! PHP-FPM is the default PHP handler for all accounts - you can find more details on that here:
    0
  • eservice
    I have this same problem maybe once a month. Usually the whole server becomes unresponsive and I have to give it a reboot. After a reboot there is a couple of minutes of time to login, "sudo iotop -o" to find out the problem user, and give it a penalty with "sudo chmod 0 /home/user1/public_html". Usually after couple of hour of penalty it is safe to change permission back to 750 and the problem has gone away. What can this problem be? My guess is that It has to do something with php-fpm hammering MySQL database internally since network traffic is almost nonexistent. How can this behavior be fixed? How can I prevent one user from hogging all the I/O and crash the server?
    0
  • cPRex Jurassic Moderator
    @eservice - it's impossible for us to say what the issue may be with just that information. If you're able to reproduce the issue with a specific account, feel free to submit a ticket to our team so we can do some additional investigation.
    0
  • eservice
    I am not able to reproduce this issue. It seems to be quite random and happens to one of 5 different accounts randomly maybe once or twice a month. How can I investigate this further for you to share your thoughts? Or how can I prevent one user from hogging all the I/O and basically crash the server?
    0
  • cPRex Jurassic Moderator
    @eservice - the best way to keep the users isolated is to use the CloudLinux operating system:
    0
  • WorkinOnIt
    I also want to add my comment here to say the enabling php-fpm can lead to a high load situation. This happens for me in a server with 5 accounts and only two are php-fpm enabled. I notice the load increase, and then the only way to resolve it is to use Home / System Health / Process Manager to kill the users processes. I understand that php-fpm can get "caught in a loop". Is there any way to limit the resources, without using cloud Linux?
    0
  • cPRex Jurassic Moderator
    If you're using issues with PHP-FPM we'd like to see a ticket on that as it shouldn't happen.
    0
  • WorkinOnIt
    If you're using issues with PHP-FPM we'd like to see a ticket on that as it shouldn't happen.

    OK I will think about a ticket, but for now have been playing around with the resources in PHP=FPM Settings under the user in MultiPHP Manager / domain settings. On my test machine (4GB ram, 2CPU, 3 user accounts) I have the following: Max Requests: 200 Max Children: 25 Process Timeout: 20 I reached these values using the calculation of : 4GB RAM for PHP-FPM processing with an average value of 20MB consumed by each child. Maximum RAM: PHP-FPM / RAM consumed by each child = Maximum children value for PHP-FPM 4000 / 20 = 200. When I simulate 50 concurrent connections, the server locks up and load reaches 50 ! I can only recover by killing the user's processes in WHM: Home / System Health / Process Manager. Is there any other way to reduce the bottlenecks?
    0
  • cPRex Jurassic Moderator
    That just doesn't sound like normal behavior to me at all - we'd really like to see a ticket on that one.
    0
  • chezmohamed
    Hello I have the same problem with a 6VCORE 30GB server that happened to me today. I have five accounts, and I"m sure it"s not from the customer"s charge. I hope you will find a solution to this problem. it is normal behaviour
    0
  • chezmohamed
    I think I found where the problem is coming from. after checking netstat on the server (in full Load Averages more than 30) I found an IP address trying to communicate with several domains at the same time so I blocked IP on the firewall and the overload problem is solved I hope this solution will help more people. the IP address is 102.222.177.130
    0
  • cPRex Jurassic Moderator
    @chezmohamed - I'm glad you were able to find that issue and fix it!
    0

Please sign in to leave a comment.