Results 1 to 4 of 4

Thread: Server with lots of sleeping processes

  1. #1
    Join Date
    May 2014
    Beans
    2

    Server with lots of sleeping processes

    Hello Community Members,


    We are running ubuntu 12.04. There are 103 PHP applications running on the same server. One application executes a command line php script for all the 103 applications. We saw a weird behavior, on the server we have 15GB ram out of which 14 GB was consumed by the apache user www-data. When our application user got active the server was very slow, almost unavailable. the htop shows that there are 637 processes for www-data in sleep mode. Further we restarted the cron server and killed all the www-data processes and the memory usage went to 705MB to 903MB.

    we have checked syslog the oom killer woke up and tried to kill processes a lot of times.

    Is there any way to find why all the processes was in sleep mode, what exactly was the process for which server was putting other process to sleep mode?

  2. #2
    Join Date
    Feb 2007
    Location
    West Hills CA
    Beans
    8,050
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Server with lots of sleeping processes

    Check the apache log files in /var/log/apache. It sounds like a PHP process fails then gets restarted. It's possible that you don't have enough memory set for each PHP process-- check your php.ini settings.
    -------------------------------------
    Oooh Shiny: PopularPages

    Unumquodque potest reparantur. Patientia sit virtus.

  3. #3
    Join Date
    May 2014
    Beans
    2

    Re: Server with lots of sleeping processes

    Thanks for your reply, the memory for php is allocated 4GB. still there are certain processes in sleep mode. After checking the apache logs we traced an error related to MaxClient.

    The question remains same why there are alot of sleeping processes with user www-data ?

  4. #4
    Join Date
    Feb 2007
    Location
    West Hills CA
    Beans
    8,050
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Server with lots of sleeping processes

    Set your PHP to development environment and look through the logs: https://help.ubuntu.com/community/Ap...shooting_PHP_5

    Go through the status of your PHP installation when RAM fills up: https://help.ubuntu.com/community/ApacheMySQLPHP#Status
    Last edited by tgalati4; May 12th, 2014 at 03:07 PM.
    -------------------------------------
    Oooh Shiny: PopularPages

    Unumquodque potest reparantur. Patientia sit virtus.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •