Failed to generate the realtime reports!

mistwang

LiteSpeed Staff
#23
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.
 

DraCoola

Well-Known Member
#24
@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?
 

mistwang

LiteSpeed Staff
#25
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.
 

mistwang

LiteSpeed Staff
#26
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.
 

DraCoola

Well-Known Member
#29
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.
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?




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.
I am using eAccelerator only as opcode.
The loaders are zend and ioncube.
There were 2-3 sites which are use ioncube.
 

DraCoola

Well-Known Member
#30
I think PHP_LSAPI_CHILDREN is too high unless your server gets millions of hits per day. What's lsphp5 Max Connections set to?
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.
 

DraCoola

Well-Known Member
#32
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
 

anewday

Well-Known Member
#33
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
 

DraCoola

Well-Known Member
#34
@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?
 

mistwang

LiteSpeed Staff
#35
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.
 

DraCoola

Well-Known Member
#36
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.
 

DraCoola

Well-Known Member
#38
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 :)
 

mistwang

LiteSpeed Staff
#39
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.
 

DraCoola

Well-Known Member
#40
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:
Top