Author Topic: Many stalled php processes  (Read 3124 times)

Offline rexdev

  • Newbie
  • *
  • Posts: 3
  • Karma: +1/-0
    • View Profile
Many stalled php processes
« on: April 26, 2017, 07:05:37 PM »
I noticed today that whenever I went to go to login as a normal user, the script would stall forever. I thought it was just my internet, so I asked a coworker to login and she experienced the same thing: the script was stalling for over an hour till she gave up.

When I did a ps aux | grep php, here is what I saw


ami      31294  0.0  0.1 235660 19496 ?        S    16:51   0:00 /usr/bin/php /path/to/cart/index.php
ami      31305  0.0  0.1 237484 21564 ?        S    16:51   0:00 /usr/bin/php /path/to/cart/index.php
ami      31358  0.0  0.1 235656 19488 ?        S    16:52   0:00 /usr/bin/php /path/to/cart/index.php
ami      31427  0.0  0.1 235660 19504 ?        S    16:52   0:00 /usr/bin/php /path/to/cart/index.php
ami      31665  0.0  0.1 235660 19496 ?        S    16:53   0:00 /usr/bin/php /path/to/cart/index.php
ami      31754  0.0  0.1 237484 21560 ?        S    16:54   0:00 /usr/bin/php /path/to/cart/index.php
ami      31991  0.0  0.1 235656 19464 ?        S    16:55   0:00 /usr/bin/php /path/to/cart/index.php
ami      32025  0.0  0.1 235656 19468 ?        S    16:55   0:00 /usr/bin/php /path/to/cart/index.php
ami      32047  0.0  0.1 235656 19468 ?        S    16:55   0:00 /usr/bin/php /path/to/cart/index.php
ami      32086  0.0  0.1 235656 19464 ?        S    16:55   0:00 /usr/bin/php /path/to/cart/index.php
ami      32405  0.0  0.1 235656 19464 ?        S    16:57   0:00 /usr/bin/php /path/to/cart/index.php
ami      32486  0.0  0.1 235656 19464 ?        S    16:58   0:00 /usr/bin/php /path/to/cart/index.php
ami      32734 93.3  0.1 236956 21440 ?        R    16:59  52:47 /usr/bin/php /path/to/cart/index.php

There were around 50 or so process and this site is not public yet. Could this be why the login hangs?

This is on a dedicated server with 4 CPUs and 16 GBS of ram.

The current load average is 4.91 4.61 4.44 on a server that gets around half a million page views a month and has an average load average of 0.75

So has anyone had a similar problem before? I know I can just reboot the server and kill all those old processes, but how did they get there in the first place? Also, this is a cPanel server, if it matters :)

Thanks for all your help!

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4358
  • Karma: +298/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: Many stalled php processes
« Reply #1 on: April 27, 2017, 08:53:33 AM »
You need to check your webserver and php configuration. I assume you have an apache.

There could be many thing that can cause this.  Start with checking version for Apache and PHP

Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

Offline rexdev

  • Newbie
  • *
  • Posts: 3
  • Karma: +1/-0
    • View Profile
Re: Many stalled php processes
« Reply #2 on: May 02, 2017, 11:43:55 AM »
Hi there,

Yes it's apache 2.2 with PHP 5.4.5 on a Centos 5 server with cPanel. Apache SuExec is on and the PHP handler is suphp.

I've run WordPress and other apps on this server, and none of them have ever stalled on me during a login.

The crazy thing is that while browsing the products it works fine. But the minute you try to login, logout, checkout, or remove something from the wish list, it freezes.

Has anyone ever encountered this problem before?


Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4358
  • Karma: +298/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: Many stalled php processes
« Reply #3 on: May 02, 2017, 12:30:44 PM »
I tired to google this problem and it comes up suggesting that you might have a problem with PHP/Apache compilation.

Try to update PHP to later 5.4.xx version. I think latest in this subversion is 5.4.45.

Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

 

Powered by SMFPacks Social Login Mod