Is a restart needed after a simple "deploy"?

76 views
Skip to first unread message

Stephen M

unread,
Nov 14, 2019, 4:00:58 PM11/14/19
to highload-php-en
Hi all,

I have a basic site. Sometimes I "deploy" an update by copying files from my local machine to the server. Does this require a php-fpm restart? Usually it just works, but yesterday I noticed that one of the scripts did not update until I restarted.

-Stephen

Joe

unread,
Nov 15, 2019, 2:58:33 AM11/15/19
to highload-php-en
Do you have opcache enabled? Which version of PHP are you using?

Stephen M

unread,
Nov 18, 2019, 4:14:13 PM11/18/19
to highload-php-en
Running PHP 7.2.24. Yeap, opcache is enabled. Let me guess, I need to reset the cache?

Joe

unread,
Nov 19, 2019, 4:53:54 AM11/19/19
to highload-php-en
It sounds like you may have the default config,in which case my theory is redundant.

However, check the output of phpinfo() and look for the opcache.validate_timestamps string. If it's false, that could explain your issue.

Stephen M

unread,
Nov 19, 2019, 5:04:25 PM11/19/19
to highload-php-en
validate_timestamps is "On". What is the expected behavior?

Joe

unread,
Nov 20, 2019, 6:26:10 AM11/20/19
to highload-php-en
When it's on it'll check for changed files every `revalidate_freq` seconds (default is 2)

Anyway, this doesn't seem to be related.

Can you reproduce this reliably?

Stephen M

unread,
May 25, 2020, 2:01:28 PM5/25/20
to highload-php-en
Sorry for the delay.

What if there are symbolic links involved? I have been using Deployer (https://deployer.org/) to deploy this site:

current -> releases/4
releases/
|--1/
|--2/
|--3/
|--4/

'current', the site's document root, is a symbolic link that points to one of the numbered folders. When there is a new deploy, it creates a new release folder and recreates the link to point to that. Could this be causing the problem?
Reply all
Reply to author
Forward
0 new messages