Failed to generate the realtime reports!

Discussion in 'Install/Configuration' started by DraCoola, Apr 29, 2009.

  1. anewday

    anewday Moderator

    What's your lsphp5 environmental settings?
  2. DraCoola

    DraCoola Member

    Here they are, bro :
    -----------------------------
    PHP_LSAPI_MAX_REQUESTS=3000
    PHP_LSAPI_CHILDREN=175
    LSAPI_MAX_IDLE=5
    LSAPI_PGRP_MAX_IDLE=5
    LSAPI_MAX_PROCESS_TIME=300
    -----------------------------


    And again.... :(

    [​IMG]
  3. mistwang

    mistwang LiteSpeed Staff

    Your server start to use swap, that's why you get high load.
    your PHP opcode cache size is a bit high to me, since eaccelerator uses /dev/shm, there is no need to set opcode cache too high.
    Also, make sure the /dev/shm got cleaned regularly.
  4. DraCoola

    DraCoola Member

    @George :

    PHP opcode cache means.... eaccelerator.shm_size?
    Mine is just use the default 16 mb.
    So I must to reduce that size again?

    Yes I remember you have told me to empty it around every 5 minutes...
    Btw I regularly clean my /dev/shm/eaccelerator with hourly cron job.
    Is that too long?
  5. mistwang

    mistwang LiteSpeed Staff

    16mb should be fine. you need to find out which process responsible for the swap usage.
    monitor the usage of /dev/shm with command "df", I think it should be cleaned more frequently.
  6. mistwang

    mistwang LiteSpeed Staff

    your PHP processes is constantly allocate more than 200MB memory, you need to find out what causes it doing that. Maybe other opcode cache or loader, should reduce the memory usage.
  7. anewday

    anewday Moderator

    I think PHP_LSAPI_CHILDREN is too high unless your server gets millions of hits per day. What's lsphp5 Max Connections set to?
  8. mistwang

    mistwang LiteSpeed Staff

  9. DraCoola

    DraCoola Member

    Yes it has loaded very fast (it was cleaned up at 5 minutes ago)....
    Code:
    Filesystem           1K-blocks      Used Available Use% Mounted on
    tmpfs                  4090756   3926160    164596  96% /dev/shm
    
    I will change my cron job to clean it more frequently.
    Is that save to move the eaccelerator.shm_dir to another disk? (that disk is just filled for /home1 only)
    Btw.... how to find out which proccess that mostly filled up that cache dir?




    I am using eAccelerator only as opcode.
    The loaders are zend and ioncube.
    There were 2-3 sites which are use ioncube.
  10. DraCoola

    DraCoola Member

    lsphp5 Max Connections is 175 (same as PHP_LSAPI_CHILDREN value).



    @george :
    Yes I use PHP suEXEC, as it shown on my "top" screen shots.
    So PHP_LSAPI_CHILDREN value will completely ignored? I'll erase that.
  11. mistwang

    mistwang LiteSpeed Staff

    You can find out how much memory reserved by those loaders from phpinfo() page and reduce it with php.ini .
  12. DraCoola

    DraCoola Member

    For additional information, some users are randomly just suddenly getting wild with their proccess.
    So the CPU load will follows until 40-50 (and that makes LSWS automatically restart with fix 503 error reason)

    I found those brutal process on CSF reports.
    Here is one for an example :

    Code:
    Time:          Tue Apr 28 15:00:58 2009 +0700
    Account:       waroacom
    Process Count: 21 (Killed)
    
    Process Information:
    
    User:waroacom PID:25158 Run Time:11(secs) Memory:233788(kb) exe:/usr/local/lsws/fcgi-bin/lsphp-5.2.9 cmd:lsphp5
    User:waroacom PID:25195 Run Time:9(secs) Memory:233788(kb) exe:/usr/local/lsws/fcgi-bin/lsphp-5.2.9 cmd:lsphp5
    User:waroacom PID:25203 Run Time:9(secs) Memory:233788(kb) exe:/usr/local/lsws/fcgi-bin/lsphp-5.2.9 cmd:lsphp5
    User:waroacom PID:25204 Run Time:9(secs) Memory:233788(kb) exe:/usr/local/lsws/fcgi-bin/lsphp-5.2.9 cmd:lsphp5
    User:waroacom PID:25232 Run Time:6(secs) Memory:233788(kb) exe:/usr/local/lsws/fcgi-bin/lsphp-5.2.9 cmd:lsphp5
    User:waroacom PID:25244 Run Time:5(secs) Memory:233788(kb) exe:/usr/local/lsws/fcgi-bin/lsphp-5.2.9 cmd:lsphp5
    User:waroacom PID:25245 Run Time:5(secs) Memory:233788(kb) exe:/usr/local/lsws/fcgi-bin/lsphp-5.2.9 cmd:lsphp5
    User:waroacom PID:25246 Run Time:5(secs) Memory:233788(kb) exe:/usr/local/lsws/fcgi-bin/lsphp-5.2.9 cmd:lsphp5
    User:waroacom PID:25253 Run Time:4(secs) Memory:233788(kb) exe:/usr/local/lsws/fcgi-bin/lsphp-5.2.9 cmd:lsphp5
    User:waroacom PID:25262 Run Time:4(secs) Memory:233788(kb) exe:/usr/local/lsws/fcgi-bin/lsphp-5.2.9 cmd:lsphp5
    User:waroacom PID:25269 Run Time:3(secs) Memory:233788(kb) exe:/usr/local/lsws/fcgi-bin/lsphp-5.2.9 cmd:lsphp5
    User:waroacom PID:25276 Run Time:3(secs) Memory:233788(kb) exe:/usr/local/lsws/fcgi-bin/lsphp-5.2.9 cmd:lsphp5
    User:waroacom PID:25282 Run Time:3(secs) Memory:233788(kb) exe:/usr/local/lsws/fcgi-bin/lsphp-5.2.9 cmd:lsphp5
    User:waroacom PID:25284 Run Time:3(secs) Memory:233788(kb) exe:/usr/local/lsws/fcgi-bin/lsphp-5.2.9 cmd:lsphp5
    User:waroacom PID:25287 Run Time:3(secs) Memory:233788(kb) exe:/usr/local/lsws/fcgi-bin/lsphp-5.2.9 cmd:lsphp5
    User:waroacom PID:25288 Run Time:2(secs) Memory:233788(kb) exe:/usr/local/lsws/fcgi-bin/lsphp-5.2.9 cmd:lsphp5
    User:waroacom PID:25291 Run Time:2(secs) Memory:233788(kb) exe:/usr/local/lsws/fcgi-bin/lsphp-5.2.9 cmd:lsphp5
    User:waroacom PID:25293 Run Time:2(secs) Memory:233788(kb) exe:/usr/local/lsws/fcgi-bin/lsphp-5.2.9 cmd:lsphp5
    User:waroacom PID:25312 Run Time:0(secs) Memory:233788(kb) exe:/usr/local/lsws/fcgi-bin/lsphp-5.2.9 cmd:lsphp5
    User:waroacom PID:25315 Run Time:0(secs) Memory:233788(kb) exe:/usr/local/lsws/fcgi-bin/lsphp-5.2.9 cmd:lsphp5
    User:waroacom PID:25316 Run Time:0(secs) Memory:174220(kb) exe:/usr/local/lsws/fcgi-bin/lsphp-5.2.9 cmd:lsphp5
    
    They are many killing process reports at a time from CSF while my CPU scream.

    But that wild process has not happen while using mod_suphp...
    It is so confusing...

    Btw, my php info page --> www.dracoola.com/hph.php
  13. anewday

    anewday Moderator

    My server shows:

    df-h
    Code:
    Filesystem            Size  Used Avail Use% Mounted on
    none                  1.5G   71M  1.5G   5% /dev/shm
    Doesn't show tmpfs under Filesystem. Is it mounted correctly?

    /etc/fstab
    Code:
    # This file is edited by fstab-sync - see 'man fstab-sync' for details
    
    none                    /dev/shm                tmpfs   noexec,nosuid   0 0
  14. DraCoola

    DraCoola Member

    @anewday:

    Here is mine :
    Code:
    tmpfs                   /dev/shm                tmpfs   defaults,noexec,nosuid    0 0
    So... is that mounted correctly?
    And how about to move eaccelerator cache dir to dedicate disk which that used for /home1 only?
  15. mistwang

    mistwang LiteSpeed Staff

    You can strace the PHP processes that uses a lot of CPU, if it is from one user, maybe you should check the script from that user or just ban that user see if it helps.
    It might be a bug in eaccelerator, so, clean /dev/shm before it is full.
  16. DraCoola

    DraCoola Member

    So that might be bug from eAcceleartor... noticed that..
    Btw I'm not compile eAccelerator by my self.
    I have just use /scripts/phpextensionmgr install eAccelerator.
    Is that affected?
    Because many (all?) forum softwares cannot recognize if there is an eAccelearator on my server (in their forum admin options).

    I have try suspend some of users with excessive usage (based on CSF reports) for a half hour.
    But still the CPU load is just randomly come and go like twister disaster.
    (as I wroted above, there's no 40-50 CPU load with suphp)

    I will try to move the eaccelerator cache dir to my /home1 partition (dedicate disk) and wait for any changes on CPU load after that.
  17. mistwang

    mistwang LiteSpeed Staff

  18. DraCoola

    DraCoola Member

    I have set "Max Idle Time" to 4 before.
    I'll changed that to 10.
    And all right then I'll cancel to move ea cache dir to /home1 partition.

    Thanks for advices :)
  19. mistwang

    mistwang LiteSpeed Staff

    It is OK to have it at "4". Check the number of PHP processes running.
    You can try disabling ea cache temporarily see if the high CPU usage PHP process goes away.
  20. DraCoola

    DraCoola Member

    I'll try to disabling ea cache at busy time of my server (it is 5:35 AM here).

    Code:
    top - 05:42:17 up 1 day, 23:31,  1 user,  load average: 0.72, 1.33, 1.48
    And I will give my update here after that.

    So many thanks, George :)
    Last edited: Apr 30, 2009

Share This Page