-
-
Notifications
You must be signed in to change notification settings - Fork 150
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
Opcache errors after deployment with symlink switch #22
Comments
Are you resetting the cache after symlinking? Can you post the deploy script (a slimmed down version). |
Yes, the reset happens after the symlink switch. But we also tried before and even after the switch at the same time to no avail. We are using Rocketeer for deployment so there is not really a "script", only a configuration and a set of tasks which are run at specific stages during the deployment. We've hooked the Opcache reset directly after the symlink switch so it is really the last thing that is done during deployment. (Except of cleanup of old releases.) Anyways here's a vastly slimmed down excerpt of the last deployment log:
|
Try clearing the realpath cache before or after the opcache reset: |
@gordalina Didn't think of that, thanks I'll give it a try. |
No luck, still getting errors after deployment. :-X I just saw this in the PHP-FPM logs though:
|
That looks like a very specific error, did you try these solutions? |
@gordalina I've also searched for this and saw the same suggestions but I fear none of them will help. As for
This sounds more like a debugging measure and I'm not sure if this is something one wants in a production environment... |
Did you try reloading php-fpm after cachetool? It restarts the workers a gracefully. |
This would be one of the remaining options which I tried to avoid due to requiring Do you mean that there will be no downtime when restarting PHP-FPM? |
Have a look here |
@gordalina Thanks, so this is about |
Not sure if I can be of further assistance. I'm closing this issue. |
@gordalina Thanks already for taking time to give me pointers here. I now went with PHP-FPM restart and so far it looks OK-ish in 90% of the deployments. I still saw an error once but I'll keep watching. |
Heh after few days of using cachetool I also started seeing this kind of behavior in my environment. Once cache is cleared – all require_* calls fails. |
Hopefully this would solve the issue: zendtech/ZendOptimizerPlus#126 (comment)
|
Even though we are invoking the cachetool during deployment to reset the PHP opcode cache, we encounter internal server errors after the symlink switch to the new release. The error disappears after a short while.
To verify that everything is basically working correct we have also put
opcache:status
before and afteropcache:reset
:While I'm not sure about the memory and string usage, scripts and keys are indeed removed as expected.
This is an environment with an Apache 2.4.10 and PHP 5.6.17 with PHP-FPM. The relevant part of the
php.ini
:Any idea what could be wrong?
The text was updated successfully, but these errors were encountered: