laravelio/laravel.io

Every page load takes 3 seconds on prod?

niels-numbers opened this issue · 3 comments

When I install this package locally it's blazing fast. When I deploy it on my VPS that I manage with PLESK Obsidian 18.0.41 every request takes 3 seconds! Even this one:

Route::get('/x', function(){
    return 'Is it still slow?' . (microtime(true) - LARAVEL_START);
});

I have many other Laravel applications, and I also tried the standalone latest Laravel/Laravel, they all work really fast. I have I have PHP 8.1.11. executed as FPM application (Apache). , I tried deployment optimization, generated key, symlink, migrated db and seeded and also run npm install and nom run build. Also created a SSL certificate.

I tried the following things to try to debug where this 3 second delay could come from:

  1. When I create a test.html file in public it loads immediately, so its not a name-server issue

I then disabled route cache

  1. In public/index.php it is slow until $kernel->handle(..)->send(..); is executed, so .htaccess and composer are not creating the problem.

  2. When I remove all middle ware, the page is still slow, so its not a middle ware which causes the issue

Next I disabled config cache

  1. I disabled as much providers as possible, but its still slow

image

  1. I have same .env as local, so there is no connection to a slow 3rd party or so

  2. When I add a dd(..) in the register method of route service provider, it renders the dump immediatly. When I add a dd(..) in the boot method of the route service provider, its takes 3 seconds. So it must be between those two function.

  3. I tried to install it again on a different subdomain, same issue

  4. I tried to install latest laravel/laravel application, this one runs very fast.

I have no idea what else could causing it.. Do you have an idea what could create the 3s delay?

image

Heya. Unfortunately we cannot provide support for this. Our own platform is running fine and fast enough on our own server.

Sure, I understand

I found out that the 3seconds loading time comes from package codeat3/blade-simple-icons although I don't understand why. Probably the reason for the vendor name codeat3. When I remove it, everything is fast, when I install it, a request takes 3seconds. Maybe it's incompatible with PHP 8.1.11? I will ask at codeat3/blade-simple-icons#63