• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

High load caused by plesk-php-clean

Red Paint

Basic Pleskian
Hello,

Been struggling with this for a while and the KB article on this is not very helpful in our situation: http://kb.parallels.com/en/119500

We have several high turnover sites on our server and noticed that in top that fuser was always taking up a lot of CPU time, often 100%. The problem pstree seemed to be caused by plesk-php-clean:

Code:
crond─┬─crond───run-parts─┬─awk
     │       │                   └─plesk-php-clean───find───fuser

I came across this link while looking for a more appropriate solution: http://blogs.reliablepenguin.com/2014/03/15/many-php-session-files and then a forum post suggesting the same solution: http://forum.parallels.com/showthre...find-and-fuser&p=637566&viewfull=1#post637566 (albeit this one was posted a lot earlier than the one above).

Essentially edit /etc/cron.hourly/plesk-php-cleanuper from:

Code:
[ -x /usr/lib64/plesk-9.0/maxlifetime ] && [ -d /var/lib/php/session ] && find /var/lib/php/session -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib64/plesk-9.0/maxlifetime) ! -execdir fuser -s {}  2>/dev/null \; -delete
to
Code:
[ -x /usr/lib64/plesk-9.0/maxlifetime ] && [ -d /var/lib/php/session ] && find /var/lib/php/session -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib64/plesk-9.0/maxlifetime) -delete

I imagine the removed code snippet is in there for a reason so can anyone tell me what are the implications of removing "! -execdir fuser -s {}  2>/dev/null \; " from /etc/cron.hourly/plesk-php-cleanuper?

I would suggest the main implication is that a session data file is deleted while the session itself is still considered as valid because the session data was not updated recently?

Many thanks
 
Back
Top