First of all, thanks for amazing docker-php images!
Heading to the actual problem…
I can’t figure out what exactly causes WinterCMS to perform so bad when it’s running using
- Running fresh WinterCMS installation on Official
php:8.0-fpm image and in separate
nginx:alpine image leads to response times of ~60-100ms. (gist of configuration here)
- Response times of the same, fresh WinterCMS installation using serversideup/docker-php images are ~300ms and higher. (gist of configuration here)
Confirmed this exact same behavior on Linux Mint 21 laptop and on Debian 11 VPS server.
Tried matching any kind of php configuration values, but nothing helped.
Tried running WinterCMS in two separate containers:
nginx:alpine, still the same - bad performance.
Interesting fact: Running fresh Laravel 9 on your images leads to very good response times - ~50-60ms on Laravel’s default welcome page.
Any ideas what could be wrong here?
Thanks for your compliments!
I am not near my development computer, but gut feeling to investigate – I wonder it if is related to this? https://twitter.com/taylorotwell/status/1552452998546300929
Thanks for such a quick response!
No, I’m pretty sure WinterCMS is not using
Thanks for the response!
From my immediate experience, unfortunately there’s nothing that comes to mind on why this would be happening. To be honest, I’ve never heard of WinterCMS until your post.
The other bummer is I am leaving for vacation right now and won’t be able to look into this immediately.
If something comes to mind, I will definitely swing back and give you an update! Hopefully someone else could help chime in the meantime
WinterCMS is open-source fork of former OctoberCMS, which moved away from open-source to subscription model last year. Both are amazing platforms, actually.
I will try my best to resolve this until my hair will start to fall out xD
Thanks, and have a good time!
So at the end I fixed it by completely disabling
Overrided this setting here and now everything works as it should - fast and sexy.
Thanks for the follow up and the solution! That’s wild it was
open_basedir. There must have been something that was trying to access something outside the provided directories?
Glancing at your code, it looks like it should have worked out of the box though
Yeah, I was completely crazy about it!
This article explains why it happens - https://www.nexcess.net/blog/php-open_basedir-and-magento-performance/.
In a few words - when
open_basedir is enabled, the PHP
realpath cache will be disabled, and projects with large file count can suffer from it. Never knew about such behavior until now, tbh.
Really glad, that this mystery was solved.
Thanks for your time and amazing project, learned a lot from it!
Thank you so much! Wow… today I learned.
Thanks for sharing such a detailed report and solution. I’m very grateful to learn from people like you!