ispcpphptemp - Printable Version +- ispCP - Board - Support (http://www.isp-control.net/forum) +-- Forum: ispCP Omega Support Area (/forum-30.html) +--- Forum: Usage (/forum-34.html) +--- Thread: ispcpphptemp (/thread-8169.html) Pages: 1 2 |
ispcpphptemp - givre - 10-20-2009 05:11 AM Hi all, Can you explain to mee what ispcphptemp.sh really do ? i have got a big problem on my server, it's cause load.. very hight.. Firts i'm was thinking that was because i had more than 3000 accounts, but on a fresh install without any account there is the same problem. It dont kill itself.. why ? Thanks for you help. Regards, Benoit. Code: root 15083 0.0 0.0 8832 1140 ? Ss 15:00 0:00 /bin/sh -c /var/www/ispcp/engine/tool /ispcpphptemp.sh >/dev/nul RE: ispcpphptemp - kilburn - 10-20-2009 05:26 PM It's supposed to remove the hanging session files from php. If it's not working properly for you, please report everything that can help us identify the issue, including at least: 1. OS/Distro 2. Ispcp version 3. Execution strace RE: ispcpphptemp - givre - 10-20-2009 08:42 PM Hi, Quote:1. OS/DistroDebian 5 lenny Quote:2. Ispcp version2 lasted version 1.2 and 1.3 Quote:3. Execution straceHere the file For my two systems they are alway processing, never stop (for each) At every cron, another ispcpphptemp is running so it takes lot of cpu/ram With the last ISPCP version, there is just one account .. Is a fresh install on virtual server who using NFS for /var/www/virtual On the other system, there is 3000 accounts. On this system i have to process the ispcphptemp.sh just one per days.. otherwise all others process can't work correctly with a lot of ispcphptemp.sh running. Thanks RE: ispcpphptemp - givre - 10-21-2009 04:22 AM Here the strace file Thank you for your help. Best Regards, Benoit. RE: ispcpphptemp - kilburn - 10-21-2009 05:55 PM It seems that your server has a problem with: Code: for ini in "${fcgidir}/php4/php.ini ${fcgidir}/php5/php.ini"; do This should loop two times, one with ini = /var/www/fcgi/domain.tld/php4/php.ini and another with ini = /var/www/fcgi/domain.tld/php5/php.ini. Now, looking at your trace file, we see the following: Code: stat("/var/www/fcgi/master/php4/php.ini /var/www/fcgi/master/php5/php.ini", 0x7fffb8768440) = -1 ENOENT (No such file or directory) So it's checking both files as if they were a single one. AFAIK, the script file is correctly assuming that they would be treated as separate entries, and the only thing that could change that is the setup of the IFS environment variable. Therefore, I would try the following things: 1. As you don't have php4, just remove the "${fcgidir}/php4/php.ini " part from the "for" lines (note that there are two fors like this in the script). After that, try to re-execute (don't have to wait for cron, just do it manually) and see if it now ends in a reasonable time... 2. Once you've ensured that this is actually the problem, recover the original script and add Code: IFS=" " If it works when using the second method, I'll patch the script accordingly RE: ispcpphptemp - givre - 10-22-2009 06:35 AM Hi, Thank you for your great support. That is good if i keep out "${fcgidir}/php4/php.ini" part from the "for" lines But, if i add Quote:IFS=" " The script do nothing RE: ispcpphptemp - kilburn - 10-22-2009 04:47 PM I don't know what else could be causing this. Can you confirm that, when manually executing Code: for f in "/php4/php.ini /php5/php.ini"; do echo $f; done Code: /php4/php.ini /php5/php.ini Code: /php4/php.ini Anyways, take into account that this script stats *all* files inside each and every customer phptmp folder. These are a bunch of files/folders to stat in your heavily loaded server, so if they are stored in an NFS server this is may also cause some slowness. Thus, unless you really need temporary files stored in the server for some reason (load balancing?), I would try to offload such files to a local disk. You should be able to do this by: 1. Moving all the phptmp folders to another (local disk) location 2. Symlinking the old location to the newer one 3. Ensuring that php lets users access this folder. I'm not sure about this, but you may have to modify customer's php.ini to allow the new (local disk) location in "open_basedir". Further, as a side effect your websites should also work faster, because now php sessions won't be stored in the NFS server but in the local disk Whatever you decide to try... test first! RE: ispcpphptemp - givre - 10-22-2009 05:21 PM Code: for f in "/php4/php.ini /php5/php.ini"; do echo $f; done Code: /php4/php.ini /php5/php.ini On my principal server, i'm not using NFS But i will do that if i use NFS and make phptmp localy But i dont understand why, if i put this : Code: IFS=" " The script dont check every customer phptmp ... and is runni 1second :s Thank You RE: ispcpphptemp - kilburn - 10-22-2009 08:23 PM Nevermind about the "IFS" thing, as it's a stupid fault on my side. Your bash behaviour is actually good, and there's an error on the ispcpphptmp.sh script that I've just fixed in trunk. Now, if you run the script twice in a very short time, the second run is expected to end almost instantly because the file properties are already in the disk cache (left there by the previous execution). If you wait some minutes, they'll have been removed from the cache and will need to be read from disk again ("stat"ing a lot of files is the slow part of this script). That said, I would need a trace of one of this "never ending" processes to actually see what's happening there (the trace you posted earlier is from an execution which finished correctly, right?). RE: ispcpphptemp - givre - 10-22-2009 08:37 PM Quote:The trace you posted earlier is from an execution which finished correctly, right?). Yes it is But when is not finish is unfortunatly on strange hours of day So, i had 2 solutions: 1- I dont modify ispcpphptmp.sh I'm wating for have some ispcpphptmp.sh in same time how dont finish correctly and i make a trace 2- I make change like this Code: remove the "${fcgidir}/php4/php.ini " part from the "for" lines I will see |