Support the ongoing development of Laravel.io →
Installation Configuration
Last updated 2 years ago.
0

I had some similar experience sometimes. Switching to PHP FastCGI (php-fpm) solved it.

0

I used php5-fpm on the nginx setup, didn't notice a difference, could be a php config issue tho

0

Is the mysql (I'm assuming that's the database in use) running on socket or tcp?

EDIT: Also, if all else fails, maybe try something like https://blackfire.io/ to see what method is taking too long or if it's a general php slowness.

Last updated 9 years ago.
0

If you have PHP slowness turning on Zend Opcache might help, I doubt this will fix the "real" problem but it's worth trying. You must be on PHP 5.5 or newer tho.

  1. Installation steps and recommended settings can be found here http://php.net/manual/en/opcache.installation.php
  2. Don't forget to set "opcache.enable = 1" in your php.ini and you might probably want to restart php-fpm at this time.
  3. Install a web based monitor to verify that caching is up and running, I personally use this one https://github.com/rlerdorf/opcache-status
  4. Tweak the opcache settings in your php.ini, test performance, rinse and repeat
0

thanks guys, found the offending code, it was an inefficient nested eloquent query.

I think in dev there was less data so I got away with it - in production there was more data so it became much slower

0

Sign in to participate in this thread!

Eventy

Your banner here too?

RexT4 rext4 Joined 2 Apr 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.