PHP FPM Process hangs after some time

Discussion in 'Server Operation' started by libelah, Jan 31, 2020.

  1. libelah

    libelah New Member

    Hi all,

    I made a fresh install following this tutorial
    on a new server of mine. I have an ispConfig Installation on another server with debian 9 which will be shut down soon. Everything is working absolutely fine there.
    I copied my Configurations for additional php FPM Versions from there.
    They seem to work fine too but after some time my nextcloud installation on the new server suddenly loads a very long time resulting in a 504 Gateway Timeout (The gateway did not receive a timely response from the upstream server or application). From then on it won't recover until I restart the corresponding php Version (systemctl restart php7-2-fpm.service). Other sites using the same php Version still run fine.
    I enabled php fpm status page and there is a process in state "Reading headers". Doing strace on that it says
    I am not sure if this is the correct process though - request uri is "-".
    Any help how to find the issue would be highly appreciated.

    Best regards
  2. Steini86

    Steini86 Active Member

    Are there any logs from php7-2-fpm.service ?
    Is it always the same site failing? What are the settings for your website? OnDemand/Static?
    Nextcloud18 can be used with php7.4 which is much faster (just saying)
  3. libelah

    libelah New Member


    thanks a lot for your response!

    I only noticed the problem on one site, so I guess it is only this one, yes.
    The settings are the same like on my old server, where everything went fine
    pm = dynamic
    pm.max_children = 10
    pm.start_servers = 2
    pm.min_spare_servers = 1
    pm.max_spare_servers = 5
    pm.max_requests = 0
    Or did you mean other settings?
    There is one log (/var/log/php-fpm.log), but it only contains warnings (log_level set to warning):
    WARNING: [pool web3] child 5703 exited with code 127 after 13.773910 seconds from start
    I am on Nextcloud 16 still, as one app has no update yet :/
    I switched to php 7.3 for this site now and till now it is running fine. Let's see if it is still tomorrow.
    I would really like to know what was the cause though...
  4. libelah

    libelah New Member

    The site is still running fine today. I also updated to Nextcloud 17, as all updates are ready to use meanwhile.

Share This Page