• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Issue High traffic, slow website. are my PHP settings correct?

Coopsy

Basic Pleskian
Server operating system version
Ubuntu
Plesk version and microupdate number
20.04.5 LTS
Hi there, please can someone help. I run a competition/raffle website on my Plesk server and at 8:30 this morning, my customer put on a prize of £20,000 and all of a sudden my server just spiked and all of my websites on my Plesk ran very slow and sluggish. very high CPU php-fpm - obs i dont want this to happen again and i so have (i think) a good server. please can some one advise if the PHP settings are correct and "efficient"? screen shots included
 

Attachments

  • graph.png
    graph.png
    39.7 KB · Views: 33
  • php settings.png
    php settings.png
    217.7 KB · Views: 34
  • server.png
    server.png
    7.8 KB · Views: 30
Maybe you can disable "Proxy mode" in your Apache & Nginx settings and then choose PHP-FPM via Nginx. This will most likely speed things up. Also for systems under high load you should carefully examine how much time each and every individual function in your scripts are consuming. Frequently there are loops with unnecessary operations or slow PHP commands that can be replaced with fast functions. Regarding your PHP settings: Why do you need a max_execution time of five minutes for an individual script? That seems to be awfully long. Why not stop a script at a much shorter time like a few seconds? Also, if your scripts need 600 M of RAM per script run, something must be terribly wrong with that. So probably it all burns down to a detailed analysis what the website scripts are really doing and to optimizing them.
 
Maybe you can disable "Proxy mode" in your Apache & Nginx settings and then choose PHP-FPM via Nginx. This will most likely speed things up. Also for systems under high load you should carefully examine how much time each and every individual function in your scripts are consuming. Frequently there are loops with unnecessary operations or slow PHP commands that can be replaced with fast functions. Regarding your PHP settings: Why do you need a max_execution time of five minutes for an individual script? That seems to be awfully long. Why not stop a script at a much shorter time like a few seconds? Also, if your scripts need 600 M of RAM per script run, something must be terribly wrong with that. So probably it all burns down to a detailed analysis what the website scripts are really doing and to optimizing them.
thanks. is it this one once disables proxy ?
 

Attachments

  • php.PNG
    php.PNG
    41.4 KB · Views: 34
thanks. is it this one once disables proxy ?
That is changing PHP processing to Nginx. You should still also remove the "Proxy mode" checkmark from the checkbox in "Apache & Nginx settings", so that everything is aways handled by Nginx instead of Apache.
 
499 is a non-standard error that is specific to Nginx. Most often it means that the web server runs into a timeout because it does not get a proper response from a script. You'll need to understand what your scripts are doing and why they are not working properly with Nginx. I suspect that in addition to the default Wordpress Rewrite rules in an .htaccess file a plugin requires more rewrites. If so, you have to translate these Apache .htaccess rules into Nginx syntax and add them into the "Additional Nginx" instructions in "Apache & Nginx settings" (similar to the rules that need to be added to avoid the 404).
 
Back
Top