I’ve got an Ubuntu 14.04 PHP 5.5 Wordpress 3.92 installation (using PHP5-FPM and Nginx).
Everything was going really well, until one of the clients created a very complex form (using Gravity Forms). He tested it on his personal dev server (Apache with PHP 5.4 and a local Mysql database) and the page loaded in about 2s - a bit slow but acceptable.
Then we copied it over to the DO server and the page refuses to load in less than 30s!
There is a load of spare RAM and originally the Mysql server was sat on a separate box, so to rule out network latency, I installed a db server locally - this has cut the time down to about 20s but it’s still way too high.
Looking at top, everything seems to be CPU bound - but I don’t understand why the (crappy) dev server would be OK and this production server isn’t. Opcache is on by the way.
Any ideas on what else I should try?
PS: I’ve installed a cache plugin, but unfortunately, most users will be logged in so I can’t rely on page-level caching (as there is user-specific stuff in the page header).
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
You can try installing HHVM to speed up your PHP code. I used the following guide to install it: http://fideloper.com/hhvm-nginx-laravel. You can learn more about HHVM here: http://hhvm.com/. And you can google up benchmarks to show that HHVM executes much faster than Zend.
Thanks for the suggestion.
However, I realised I was actually wrong - it was a 13.04 server, not 14.04.
Did a dist-upgrade and now it’s running as I would expect, rendering the form in less than a second.
No idea why the dist-upgrade would make such a difference, but I’m actually on an LTS release now, so I guess that plays a part.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.