php sleep() and apache

Discussion in 'Apache' started by Talker, Nov 30, 2008.

  1. #1
    Hi there,

    I have a server running on Apache.
    I also have a script that uses a PHP function

    sleep(10);
    PHP:
    This sleep function seems to clog up Apache.
    This is what apache says:

    
    Current Time: Monday, 01-Dec-2008 01:57:54 EST
    Restart Time: Tuesday, 25-Nov-2008 10:50:32 EST
    Parent Server Generation: 6
    Server uptime:  5 days 15 hours 7 minutes 22 seconds
    Total accesses: 26158978 - Total Traffic: 65.0 GB
    CPU Usage: u196.92 s17.72 cu0 cs0 - .0441% CPU load
    53.8 requests/sec - 140.1 kB/second - 2668 B/request
    256 requests currently being processed, 0 idle workers
    WWKCWWCKCKCWKCKCKKWWKWWKWWWWKWWKKWWWKKWWWKWCKWCKWWKWKKWCKWWKCKKW
    KCWWWKWWKCKWWWCWKKKWKKKKRWCKKKKWKKKKWKKWWWKWWWCKKKKWWKKWWKKKCCWK
    CKWWWKKWWKWKWKWWCWWKKWKWKWKKKKKWKKKKWWKKWWKKKKWKWWKWKWKKKWCWWKKW
    KWWWWKWKWWKWWRKKCWKWWCWCWWKKWKCKKKKKCCWWRWKWWWWWKWRKKWKWKKWCWKKC
    
    
    Code (markup):
    The max requests (maxcleints) are limited to the default value if 256, unless i recompile to a higher number.
    All the requests (90% of them) are the same pages that have the sleep function on it. So as far as i see apache is holding the page and waiting for the script to finish on all these requests.

    Is there any way i can lower these requests keeping the sleep function intact?
    I just want to make sure i dont drop any new connections to apache while my pages including sleep are working.

    May some apache configuration?

    Talker.
     
    Talker, Nov 30, 2008 IP