• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Update from 10.4.4 to 11, Mysql / Apache very slow

I

igareth

Guest
After updating to 11.0.9 our sites have been very slow. If we restarted mysql they would work for a but then go slow again.

The Plesk Panel was also very slow.

The CPU was being used about 25% and plenty of memory 2gb. let
Running cents 5.

To get the server working I have rename the script /opt/plesk-billing/task-manager/scripts/run-all.sh to run-all.shx to prevent it running, and I killed a find process that root was running (around 5 times) and shutdown the panel using /etc/init.d/psa stop


As the server is now running we have had emails like below, and also one stating it cannot find the script'
/bin/sh: /opt/plesk-billing/task-manager/scripts/run-all.sh: No such file or directory' - this seems to be the cause.

Subject: Cron <psaadm@cribyn> /opt/plesk-billing/task-manager/scripts/run-all.sh --config /opt/plesk-billing/task-manager/config/config.ini
Content-Type: text/plain; charset=UTF-8
Auto-Submitted: auto-generated
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/usr/local/psa/admin>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=psaadm>
X-Cron-Env: <USER=psaadm>

{"result":null,"error":{"code":-32603,"message":"SQLSTATE[HY000] [2002] Resource temporarily unavailable","data":{"errorInfo":null}},"id":"","jsonrpc":"2.0"}

Any suggestions? to the cause/fix?
 
Are you using plesk billing module? Otherwise you can uninstall it that is if you aint using it ...
Do you need instructions of how to remove it?
 
Yes, I'd love to remove it. I cannot get into the panel - so removing that manually would be good? - Do you have instructions?
 
Uninstall "Customer & Business Manager" and "Single Sign-On"

#rpm -e sw-sso plesk-billing plesk-billing-plugins
#/etc/init.d/psa restart

Those are the commands to execute
 
Thanks,

After the emails started coming through it looks like the actual script is something different- plesk-php-cleanuper - Any one have any ideas what this is?

/etc/cron.hourly/plesk-php-cleanuper:

/etc/cron.hourly/plesk-php-cleanuper: line 8: 29624 Terminated find /var/lib/php/session -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib64/plesk-9.0/maxlifetime) ! -execdir fuser -s {} \; -delete 2> /dev/null
 
To prevent the lockup I have commented out the line in the file /etc/cron.hourly/plesk-php-cleanuper - this prevents the code running for now, and the server is back working, and stays that way!
 
igareth,

try to remove old session files from /var/lib/php/session
 
To prevent the lockup I have commented out the line in the file /etc/cron.hourly/plesk-php-cleanuper - this prevents the code running for now, and the server is back working, and stays that way!

I think plesk-php-cleanuper is responsible for clearing the session folders, removing the plesk tmp generated files and etc. Disabling this may not be very health for your server :)
 
Hi,

Thank vovik64 I delete 1.9gb of sessions! then enabled the script again - I guess I've been needing that and the initial find/delete was causing speed issues.
 
plesk-php-cleanuper is supposed to have cleaned up the /var/lib/php/session for you automatically. Why it didnt in the first time, you need to dig deeper so as it doesn't fail again the second time.

Otherwise, you can also run:

chmod -R 1777 /var/lib/php/session

Just incase the problem was with permissions to the session folder that plesk-cleaner faced
 
To enable the system to function immediately I renamed the directory:
mv /var/lib/php/session /var/lib/php/session_old

I recreated a directory:
/var/lib/php/session
chmod -R 1777 /var/lib/php/session

I then deleted the directory:
rm -rfv ./session_old
in verbose mode to check.

Everything is back to normal for me.
 
Hi, I'm managing two Plesk 11 servers, one is CentOS, other is Ubuntu. On the first one, I did the same as Newbab with the php session folder, and performances were increased a lot! Thanks for the tip.

But I also wanted to completely remove the "Customer & Business Manager" and "Single Sign-On" with:

#rpm -e sw-sso plesk-billing plesk-billing-plugins
#/etc/init.d/psa restart


On CentOS server it looks pretty ok, the related left menus disappeared in my Plesk panel, but I still have this annoying warning each time I log in (translated from french, sorry...): "You connected this server to Customer & Business Manager, but the connection has been damaged. Maybe an application was updated separately or a full backup was exectuted. Please connect to Customer & Business Manager and repair connection to this server. All panel commercial operations have been disabled". Is there a "clean and good" way to get rid of this warning?

On Ubuntu server, the problem is way bigger: I can't log in to Plesk panel anymore... I used:

#apt-get remove sw-sso plesk-billing plesk-billing-plugins
#/etc/init.d/psa restart


Each time I go to Plesk url, I'm redirected to same url + /relay, and end up with a "No input file selected" message. Doesn't sound good. Would you have any idea of what happened and how I can fix this? Support would be really much apprecitated... Thanks.
 
Last edited by a moderator:
Wow, that was perfect, for both servers...
Really thanks a lot :)
 
Is there a way to fix this problem but retain SSO + billing functionality? I have the same problem after upgrading, but I also use the billing system. Sw-engine-cgi hangs and eats cpu until system is shutdown or I kill the process. If I kille the process it takes a few minutes before it comes back.

I also get this in /var/log/sw-cp-server/error_log every 5 minutes or so...

2012-08-22 18:56:51: (connections.c.1762) SSL (error): 5 -1 32 Broken pipe
2012-08-22 19:01:53: (connections.c.1762) SSL (error): 5 -1 32 Broken pipe
2012-08-22 19:06:55: (connections.c.1762) SSL (error): 5 -1 32 Broken pipe
2012-08-22 19:11:58: (connections.c.1762) SSL (error): 5 -1 32 Broken pipe
2012-08-22 19:17:00: (connections.c.1762) SSL (error): 5 -1 32 Broken pipe
2012-08-22 19:22:02: (connections.c.1762) SSL (error): 5 -1 32 Broken pipe
2012-08-22 19:22:46: (mod_fastcgi.c.2613) unexpected end-of-file (perhaps the fastcgi process died): pid: 8090 socket: unix:/opt/psa/tmp/sw-engine.sock-0
2012-08-22 19:22:46: (mod_fastcgi.c.3400) response not received, request sent: 888 on socket: unix:/opt/psa/tmp/sw-engine.sock-0 for /plesk-billing/task-manager.php?, closing connection
2012-08-22 19:27:04: (connections.c.1762) SSL (error): 5 -1 32 Broken pipe
2012-08-22 19:32:06: (connections.c.1762) SSL (error): 5 -1 32 Broken pipe

ls -la /proc/10888/fd

total 0
dr-x------ 2 psaadm sw-cp-server 0 Aug 22 19:48 .
dr-xr-xr-x 7 psaadm sw-cp-server 0 Aug 22 19:25 ..
lrwx------ 1 psaadm sw-cp-server 64 Aug 22 19:48 0 -> socket:[34509]
lrwx------ 1 psaadm sw-cp-server 64 Aug 22 19:48 1 -> /dev/null
l-wx------ 1 psaadm sw-cp-server 64 Aug 22 19:48 10 -> /opt/psa/var/psasem.sem
lrwx------ 1 psaadm sw-cp-server 64 Aug 22 19:48 11 -> socket:[34671]
l-wx------ 1 psaadm sw-cp-server 64 Aug 22 19:48 12 -> /var/log/sw-cp-server/error_log
lrwx------ 1 psaadm sw-cp-server 64 Aug 22 19:48 13 -> /var/lib/plesk-billing/task-manager/lock/runAll-1.lock
lrwx------ 1 psaadm sw-cp-server 64 Aug 22 19:48 14 -> /var/lib/plesk-billing/task-manager/lock/runAll-1.lock.data
lrwx------ 1 psaadm sw-cp-server 64 Aug 22 19:48 15 -> /var/lib/plesk-billing/task-manager/lock/master.lock
lrwx------ 1 psaadm sw-cp-server 64 Aug 22 19:48 16 -> /var/lib/plesk-billing/task-manager/lock/master.lock.data
lrwx------ 1 psaadm sw-cp-server 64 Aug 22 19:48 17 -> socket:[40411]
lrwx------ 1 psaadm sw-cp-server 64 Aug 22 19:48 18 -> /var/lib/plesk-billing/task-manager/lock/Task.lock
lrwx------ 1 psaadm sw-cp-server 64 Aug 22 19:48 19 -> /var/lib/plesk-billing/task-manager/lock/Task.lock.data
l-wx------ 1 psaadm sw-cp-server 64 Aug 22 19:48 2 -> /var/log/sw-cp-server/error_log
lrwx------ 1 psaadm sw-cp-server 64 Aug 22 19:48 3 -> /tmp/.apc.16kJB2 (deleted)
lrwx------ 1 psaadm sw-cp-server 64 Aug 22 19:48 4 -> /tmp/.apc.G647Wc (deleted)
lrwx------ 1 psaadm sw-cp-server 64 Aug 22 19:48 5 -> /tmp/.apc.ZkXwin (deleted)
lrwx------ 1 psaadm sw-cp-server 64 Aug 22 19:48 6 -> /tmp/.apc.6j8VDx (deleted)
lrwx------ 1 psaadm sw-cp-server 64 Aug 22 19:48 7 -> /tmp/.apc.1itlZH (deleted)
lrwx------ 1 psaadm sw-cp-server 64 Aug 22 19:48 8 -> /tmp/sw-engine-fcgi-accept-stamp.9bAsoS (deleted)
lrwx------ 1 psaadm sw-cp-server 64 Aug 22 19:48 9 -> socket:[34613]
 
Last edited by a moderator:
Limiting number of Plesk PSA connections

When you log into your Plesk administration panel, https://example.com:8443, you're accessing a special web server over SSL. This web server process is httpsd, and it's larger than the stock httpd process that serves your web content.To reduce its memory usage, you can reduce the number of processes it spawns, thus usually freeing up 10-60 MBs.

Code:
vim /usr/local/psa/admin/conf/httpsd.custom.include

Next, add the following overrides:
Code:
MinSpareServers 1
MaxSpareServers 1
StartServers 1
MaxClients 5

This reduces the number of Plesk processes (httpsd) that are running to a minimum. Before restarting the web server, you can safely run a test to check that your settings are valid by running the following command:

Code:
/usr/local/psa/admin/sbin/httpd_modules_ctl configtest
/usr/local/psa/admin/sbin/httpd_modules_ctl graceful
/etc/init.d/psa restart
 
There is no /usr/local/psa/admin/conf/httpsd.custom.include file on my install.
My Apache isn't terribly slow either, but sw-engine-cgi is eating a lot of cpu and Cron sends me
e-mail every 5 minutes about

Cron <psaadm@moits> /opt/plesk-billing/task-manager/scripts/run-all.sh --config /opt/plesk-billing/task-manager/config/config.ini

And message contains

curl: (18) transfer closed with 49 bytes remaining to read


Also:
# crontab -u psaadm -l
no crontab for psaadm





Screenshot of my 'top' attached.


http://i50.tinypic.com/2exq153.png Link
 

Attachments

  • top.png
    top.png
    120 KB · Views: 12
Last edited by a moderator:
Back
Top