Einen Überblick über das Administrationstool KeyHelp der Keyweb AG und dessen Download gibt es auf https://www.keyhelp.de

Dieses Forum soll es interessierten Benutzern ermöglichen, sich über KeyHelp auszutauschen und Hilfe bei Problemen zu finden.

Laravel App deployment synlink cache issue

For questions about the usage of KeyHelp and the configuration of it services.
Antworten
stevetoza
Beiträge: 1
Registriert: Mi 24. Nov 2021, 14:19

Laravel App deployment synlink cache issue

Beitrag von stevetoza »

Hello,

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

For example: current is the doc root below

Code: Alles auswählen

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
Benutzeravatar
Alexander
Keyweb AG
Beiträge: 2312
Registriert: Mi 20. Jan 2016, 02:23

Re: Laravel App deployment synlink cache issue

Beitrag von 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
**************************************************************
Antworten