Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

do we need to restart apache + APC after new version deployment of app?

when we deploy our app, we simply create a new folder and point a symbolic link to it, so apache will always find its way to the latest build.

However, we get strange errors when we deploy and continue testing without first rebooting the apache server. We also have APC running and have a feeling that caching has something to do with this.

Is it normal that an apache restart is required when deploying a new version of our php application when APC is active? Or is there a better way, e.g. clearing the APC cache using a shell script?

like image 811
Jorre Avatar asked Jun 29 '10 20:06

Jorre


2 Answers

You can use apc_clear_cache().

See related questions:

How to clear APC cache entries?

How to clear APC cache without crashing Apache?

like image 87
Vinko Vrsalovic Avatar answered Oct 01 '22 00:10

Vinko Vrsalovic


depends if you have the apc.stat setting in php.ini On or Off. If Off (typical for a production site) then you need to clear the code cache or restart apache; if On, then it should pick up the new code automatically

like image 42
Mark Baker Avatar answered Sep 30 '22 23:09

Mark Baker