-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Random Blank white page frequently while using php8.2-fpm #14605
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is way too low. You should use this only if you experience some memory leaks so either remove it or significantly increase it. |
Let me try by removing it then observe. |
Hello @bukka For your more information, I enabled opcache error log as suspicious cause of this error and I found below logs at exactly same time when child processes are being exited unexpectedly. /var/log/opcache-error.log
Where left side process id is same which child process is exited with error 70. I want to know root cause of this error. |
I am able to reproduce the same / similar case Different pool for different user (Multi user php fpm configured)
site1_document_root/longrunningscript.php <?php sleep(1000); site2_document_root/clearcache.php <?php opcache_reset(); Run longrunningscript.php
Run clearcache.php
After 10 seconds run any script of site2,
now all websites having different pool with php fpm stops with error 70. It seems opcache clear and restart cache is not able to do necessary things, it is going to |
Removing pm.max_requests = 50 didn't help. |
Ok I think I know the cause of this. The problem is that opcache is using single shared memory. This is pretty much duplicate of #8072 (there is more info about this issue) and https://bugs.php.net/bug.php?id=74709 (also contains some additional info). Unfortunately the solution for this is quite complex and it will take time - see #11723 Currently the only way how to prevent those issues is to use the same user / group for all pools. |
Hello @bukka , But, opcache_reset(); is called only in above example, in actual code or production, we never call opcache_reset(); from php code. So by knowing the cause of opcache reset, if we can do some more fine tuning of pools that can help us to less frequent restart of opcache. |
@rahulthackkar Apology for the late reply. Somehow missed your question. From the quick look to the code, it does that on opcache.force_restart_timeout expiration. So theoretically if you set it really high, you could prevent the issue but not sure if it's a good idea to basically disable those restarts and whether it might potentially cause some other issues... |
Description
My ubuntu 22.04 server has installed php8.2-fpm (8.2.19) and apache 2.4.52.
Server configuration: 4 core CPU, 16GB RAM, Swap : 0
I have 72 websites with each have own pool with below same config.
With php modules enabled as below
We are facing blank white page randomly with php8.2-fpm, sites are down , when I check service php8.2-fpm status, it was active.
Memory consumption at that time was also not much, 80% RAM was available almost.
I also tried to coredump , but no crash at all, what I have in logs are as below, error code 70.
/var/log/php8.2-fpm.log have below logs when white page
Not able to find out the root cause of this, can you help me with this please ?
Also please let me know what more information required to find out this issue.
PHP Version
PHP 8.2.19
Operating System
Ubuntu 22.04
The text was updated successfully, but these errors were encountered: