1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Update from 10.4.4 to 11, Mysql / Apache very slow

Discussion in 'Plesk 11.x for Linux' started by igareth, Jun 20, 2012.

  1. igareth

    igareth Guest

    0
     
    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?
     
  2. abdi

    abdi Platinum Pleskian

    31
    18%
    Joined:
    May 14, 2006
    Messages:
    2,913
    Likes Received:
    60
    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?
     
  3. igareth

    igareth Guest

    0
     
    Yes, I'd love to remove it. I cannot get into the panel - so removing that manually would be good? - Do you have instructions?
     
  4. abdi

    abdi Platinum Pleskian

    31
    18%
    Joined:
    May 14, 2006
    Messages:
    2,913
    Likes Received:
    60
    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
     
  5. igareth

    igareth Guest

    0
     
    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
     
  6. igareth

    igareth Guest

    0
     
    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!
     
  7. vovik64

    vovik64 Guest

    0
     
    igareth,

    try to remove old session files from /var/lib/php/session
     
  8. abdi

    abdi Platinum Pleskian

    31
    18%
    Joined:
    May 14, 2006
    Messages:
    2,913
    Likes Received:
    60
    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 :)
     
  9. igareth

    igareth Guest

    0
     
    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.
     
  10. abdi

    abdi Platinum Pleskian

    31
    18%
    Joined:
    May 14, 2006
    Messages:
    2,913
    Likes Received:
    60
    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
     
  11. Newbab

    Newbab Guest

    0
     
    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.
     
  12. Pascool

    Pascool Guest

    0
     
    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: Aug 12, 2012
  13. abdi

    abdi Platinum Pleskian

    31
    18%
    Joined:
    May 14, 2006
    Messages:
    2,913
    Likes Received:
    60
  14. Pascool

    Pascool Guest

    0
     
    Wow, that was perfect, for both servers...
    Really thanks a lot :)
     
  15. abdi

    abdi Platinum Pleskian

    31
    18%
    Joined:
    May 14, 2006
    Messages:
    2,913
    Likes Received:
    60
    Your most welcome :)
     
  16. Anders Jacobsen

    Anders Jacobsen Guest

    0
     
    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...

    ls -la /proc/10888/fd

     
    Last edited by a moderator: Aug 22, 2012
  17. Anders Jacobsen

    Anders Jacobsen Guest

    0
     
    No one knows what cause the problem and how to fix?
     
  18. abdi

    abdi Platinum Pleskian

    31
    18%
    Joined:
    May 14, 2006
    Messages:
    2,913
    Likes Received:
    60
    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
     
  19. Anders Jacobsen

    Anders Jacobsen Guest

    0
     
    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
     

    Attached Files:

    Last edited by a moderator: Aug 25, 2012
Loading...