1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PHP-FPM high CPU usage caused by something with database - Any help or ideas?

Discussion in 'Server Configuration and Hosting' started by Coop1979, Jun 23, 2016.

  1. Coop1979

    Coop1979 Well-Known Member

    I've had a weird issue pop up over the last day or so. I run a dual server setup with Nginx and PHP on one, and Percona MySQL server on the other. PHP-FPM has been having big CPU usage and based on my research it appears to be caused by an issue with the database. If I kill my one XenForo installation, the rest of the server goes back to normal. The DB server never shows any change in CPU load.

    I had noticed over the last week or so that my slow query log was filling up with queries from the XenForo database.

    I tried setting the board to inactive, but that didn't make any difference.

    I have no idea what to do at this point. Any ideas?
  2. rainmotorsports

    rainmotorsports Well-Known Member

    Had a similar issue. Never resolved it. I moved the site off the host, replaced every single file with a clean copy. Never appeared again. In the end i felt like it was actually an issue with the deferred/cron system. But as it went away i can never be sure.

    When the issue was going on I had actually tried switching between nginx and apache and after a few minutes no matter how I did the php handler setup the cpu usage would slam the server.
    Coop1979 likes this.
  3. Coop1979

    Coop1979 Well-Known Member

    Thanks for the quick response, @rainmotorsports.

    Are you referring to replacing every XenForo file with a clean copy?
  4. rainmotorsports

    rainmotorsports Well-Known Member

    Yeah plugins and all. Save for the theme files and attachments etc. I can't say that it did anything. I just know by then it was fine. Multiple servers and setups. Same problem. Replaced the files and it happened to have stopped.

    I did that mainly because of previous history of files being modified by a malicious attack. But historically not something that has happened since we got rid of bulletin. So...

    A file health check will turn up anything bad with the stock files but not for most plugins.
  5. Coop1979

    Coop1979 Well-Known Member

    Hmmm... weird. I just set the Cache to 'false' and things have normalized.

Share This Page