1

I meet a problem with php-fpm when deploying new code to the webserver.

I have nginx + php-fpm + apc to serve my site. for code deployment, I use git to pull code form git repository.

The problem is : when I git pull the new code to deploy code update to web server, php-fpm does not reflect the update, still serve the code before pull. I have to restart php-fpm, then the updated code is served.

This is very inconvenient for deployment. I googled around but does not find any hint about the reason behind.

Can anyone tell me why and is their any way to avoid restart?

4

2 回答 2

1

这实际上听起来不像是 FPM 问题,而是 APC 相关问题。我相信您的 APC 正在缓存您的内容,并且在重新启动 FPM 之前它不会反映。

于 2013-01-17T17:39:50.073 回答
0

这确实听起来像一个 php-fpm 问题。您必须重新加载 php-fpm 才能更新正在提供的 php 文件。为此,对 php7 运行“service php-fpm reload”或“service php7.0-fpm reload”。这基本上会清除其代码缓存并刷新以显示代码的最新状态。

于 2016-11-04T04:29:55.230 回答