Have you checked CPU and network load on the production server?
Blackfire might help you out. You can profile single requests on production server (never tried, but it's written in the site).
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I built a new server on Laravel Forge. I removed php 7 and put in 5.6.
I have an API endpoint that returns a HasMany relationship. In Dev, with a copy of the production database, on my Macbook Pro the underlying query returns in ~1.8ms. The total processing time for the method is ~.50 seconds using $time = microtime(true) - $_SERVER["REQUEST_TIME_FLOAT"];
In production it takes about 20seconds(!!!) for this same call to return. In our crummy staging server it only takes 2.
What's causing such a drastic slowdown? I know it's not the query or the method.
Ubuntu 16 Nginx PHP-Fpm 5.6 (Stock configuration)
What do I need to do to speed this up? Where should I look?
Please or to participate in this conversation.