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

Massive CPU Load Due to PHP

Discussion in 'Server Configuration and Hosting' started by tehelgee, Nov 29, 2014.

  1. tehelgee

    tehelgee Member

    I run a Xenforo forum that gets about 60-120 users at a time, depending on time of day. And after the first day of running the forum, servers loads have being extremely high: spiking up to 16 on a 4 core system at times. The memory shows about 60% use at max, so it's not a problem there.

    Using top in ssh shows the problem to be php. It constitutes the majority of the high cpu load processes.

    What can i do to help alleviate this problem?

    I'm a complete noob at running a VPS, btw, so please answer in layman's terms.
  2. Solidus

    Solidus Well-Known Member

    Which PHP handler are you using? DSO, fastcgi, suPHP etc..
  3. tehelgee

    tehelgee Member

    How do I check that in WHM?

    I called myself a complete noob for a reason.
  4. Solidus

    Solidus Well-Known Member

    Service Configuration > Configure PHP and suEXEC
  5. tehelgee

    tehelgee Member

  6. Solidus

    Solidus Well-Known Member

  7. tehelgee

    tehelgee Member

    Yeah, it's just my single site on the VPS.

    And I'm willing to try just about anything to fix this problem. How will I go about installing DSO? Or do I contact my provider and ask them to do it?
  8. Solidus

    Solidus Well-Known Member

    DSO is packaged with WHM, just select it on the Configure PHP and suEXEC page.

  9. tehelgee

    tehelgee Member

    Oh, okay.

    Now, before I do anything with it, the page you linked me to earlier said that permissions are more fiddly with DSO. Will the permissions set themselves, or will I? Because if I need to, I'd like you(or anyone) to help me figure that out before I do anything.

    Like I mentioned earlier, it's just one website running on the VPS, and that's all I ever foresee there being. The forum is the entire point of it, after all.
  10. Solidus

    Solidus Well-Known Member

    I've had no problems switching between suPHP and DSO before with 2 sites on the server.
    It's possible that your VPS simply isn't powerful enough too. How many vcores and how much ram?
  11. tehelgee

    tehelgee Member

    4 cores, 1.5gb ram.

    How those cores are rated, I don't know. Probably 2 or 2.5 gb.
  12. tehelgee

    tehelgee Member

  13. Solidus

    Solidus Well-Known Member

    That's more than adequate.
    You can try FastCGI first if you like, it uses the same file permissions and ownership as suPHP. If it doesn't work, just switch back.
  14. tehelgee

    tehelgee Member

    Currently trying it out.

    Nobody can connect. @alethiophile pointed out that it's not running httpd.
  15. tehelgee

    tehelgee Member

    Update on that: apparently during the reboot, the server failed to reboot. Provider tech couldn't get it to reboot properly either. Provider admin will be looking into it now.

    /me just has no luck.
  16. Solidus

    Solidus Well-Known Member

    Switching PHP handler wouldn't cause that. There must be other issues.
  17. tehelgee

    tehelgee Member

    Well, back again after the provider has looked over things.

    This is what they pointed out. Any ideas?
  18. Xon

    Xon Well-Known Member

    This is like anti-performance.

    Don't use this.

    Something is trying to send a lot of email for some reason (the 6 dovecot proceses), and you are using suPHP. fixing both of these will likely resolve your problems.
    Last edited: Nov 30, 2014
    Vanathor likes this.
  19. tehelgee

    tehelgee Member

    Oh, hey Xon.

    Anyway, with the assistance of a much more IT knowledgeable member of my forum, we switched to FastCGI and a reinstall was done with the old database imported into the new install. And, all the problems seem to have gone away.

    So, it doesn't seem like it was a configuration issue, it was probably something I did during installation.

    @alethiophile is pure magic, I'm telling you.

Share This Page