2

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?

0

2 Answers 2

1

This doesn't actually sound like an FPM problem but an APC related issue. I believe your APC is caching your content and it wouldn't be reflected until FPM was restarted.

Sign up to request clarification or add additional context in comments.

Comments

0

This indeed does sound like a php-fpm problem. You have to reload php-fpm in order to update what php files are being served. To do this run "service php-fpm reload" or "service php7.0-fpm reload" for php7. This basically clears its code cache and refreshes to display the newest state of your code.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.