@SuperPSX Happy you are here
Considering you are using PHP I believe this is a PHP sessions issue. Just run as sudo user:
# deletes php 7.4 session folders and recreates them
$ rm -rf /var/lib/lsphp/session/lsphp74; mkdir -p /var/lib/lsphp/session/lsphp74; chmod 1733 /var/lib/lsphp/session/lsphp74
Hi Jose, Thank you for your reply. I have a question, Only my 1 Processor working also 3 sleeping? What does sleeping mean?
Well wrong wording. Processors cannot go to sleep. 3 cores are inactive or isolated through cpuset or VPS setting by your provider. Consult your provider.
Or do you mean you have a bunch of processes that are asleep?
Hi, sorry for my bad wording. I’ve attached screenshot where you can see only 1 processor is running and 3 sleeping (inactive). I don’t know how to activate them. I’m facing 100% CPU usage issue when I edit/publish/update posts. I don’t know much about server status I mean how to check and fix it. Please guide
Can you reupload this image here
Screenshot-2022-10-31-001049 hosted at ImgBB — ImgBB not any other external service. Click on reply and on the messaging toolbar look for upload option to add your screenshot.
Sleeping processes do not utilize CPU or affect performance. Follow the steps I gave you here
High CPU Usage, 4CPU 8GB RAM - #2 by josephgodwinke
Where to put these commands? Putty/SSH?
$ rm -rf /var/lib/lsphp/session/lsphp74
mkdir -p /var/lib/lsphp/session/lsphp74
chmod 1733 /var/lib/lsphp/session/lsphp74
Can I just copy-paste and enter them one by one?
Open SSH terminal using any client
log in as a sudo user or root
copy this command as is:
rm -rf /var/lib/lsphp/session/lsphp74 && mkdir -p /var/lib/lsphp/session/lsphp74 && chmod 1733 /var/lib/lsphp/session/lsphp74
Test by trying to edit several bog posts or have one wp website updating multiple plugins and another try to upload an image
Still same, No changes, I’m gonna upload a video on YouTube for you.
Redis Extension: Enabled
This might be a reason. I missed it ! sorry am multi-tasking
Am convinced becuase here
High CPU Usage, 4CPU 8GB RAM - #7 by SuperPSX you are consuming 5gb of RAM in buffer/cache. This must be some technology hogging the system via caching. Try this
$ systemctl status redis.service
$ systemctl stop redis.service
$ systemctl restart lscpd
Then test your server and take a screenshot of your server stats from cyberpanel
Please watch this short video:
CPU Usage 100% - YouTube
Now post a screenshot of the result of running this command
Well we can rule out the php sessions issue unless you are running multiple php versions. To be sure try this:
# start here copy line bleow me
rm -f /var/lib/lsphp/session/lsphp71/* && rm -f /var/lib/lsphp/session/lsphp72/* && rm -f /var/lib/lsphp/session/lsphp73/*
# then copy line below me
rm -f /var/lib/lsphp/session/lsphp74/* && rm -f /var/lib/lsphp/session/lsphp80/* && rm -f /var/lib/lsphp/session/lsphp81/*
Now to address this cancerous component issue that craps a systemd service out:
Unable to register authentication agent: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: Cannot determine user of subject
Run the commands line by line:
# add user to the group
$ groupadd -g 23 nohidproc
$ usermod -a -G nohidproc polkitd
$ mount -o remount,rw,hidepid=2,gid=nohidproc /proc
$ systemctl restart polkit
# nano /etc/fstab or run it directly
$ echo "proc /proc proc defaults,hidepid=2,gid=nohidproc 0 0" >> /etc/fstab
# add new mount
$ mount -a
$ systemctl restart polkit