Page 1 of 1

Laravel App deployment synlink cache issue

Posted: Wed 24. Nov 2021, 14:24
by stevetoza
Hello,

We deploy our laravel apps using a symlink to the doc root.

For example: current is the doc root below

Code: Select all

current -> /home/users/accountuser/www/domain.co.uk/releases/0.1.0+603
When we deploy the symlink gets swapped to a new folder in /releases

For some reason once the deployment has completed the symlnk is is updated to the new folder in releases but the old code is still getting served. I've tried a restart of the php74-fpm pool but still seems to be serving the old version - This works fine on a plesk server

Any help or ideas would be great

Thanks

Re: Laravel App deployment synlink cache issue

Posted: Wed 12. Jan 2022, 14:57
by Alexander
Hello,

When updating the symlink, the corresponding PHP-FPM of the domain has to be reloaded or restarted in order to work.
I've tried a restart of the php74-fpm pool but still seems to be serving the old version
As I can not reproduce this, and its working fine on my test machines probably one of the following happened on your server:

1) You may have restarted php74-fpm, but the domains was configured to use a different interpreter. Have a look into the domain overview in KeyHelp. If uses the default PHP-Interpreter "service php74-fpm reload" would be sufficient. It it is configured to use one of the additional interpreter, use "service keyhelp-php<VERSION>-fpm reload"

2) Make sure you have correctly updated the symlink. Just happened to me while testing this behavior.


---

Some alternatives, instead of manually call the reload command:

1) You may want to let the domain directly point to the desired directory, by setting the target directory of the domain accordingly.

2) To let KeyHelp perform a reload of the PHP-FPM, just go to the domain overview -> select the domain for editing -> and hit "Save". This will trigger rewrite of the configuration and therefore reload of PHP-FPM.