Laravel App deployment synlink cache issue

Discussions about the usage of KeyHelp.
Post Reply
stevetoza
Posts: 5
Joined: Wed 24. Nov 2021, 14:19

Laravel App deployment synlink cache issue

Post 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
User avatar
Alexander
Keyweb AG
Posts: 3814
Joined: Wed 20. Jan 2016, 02:23

Re: Laravel App deployment synlink cache issue

Post 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.
Mit freundlichen Grüßen / Best regards
Alexander Mahr

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
Post Reply