• The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Question Php-fpm / Must reload if update symbolic link

Erwan

Regular Pleskian
Server operating system version
AlmaLinux 9.3
Plesk version and microupdate number
18.0.60
Hi all,

We have a website installed on two instances with Plesk and shared storage. It uses PHP FPM and the website directory is: /var/www/vhosts/mondomain/current/.
"current" is a symbolic link that points to a version (currently after e.g. "release/1").
Everything works fine.

The problem is that when we change the symbolic link (e.g. "release/2"), PHP FPM continues to use "release/1".
We need to do a manual reload for the change to take effect.

Is there any way to avoid this?
 
Hi all,

We have a website installed on two instances with Plesk and shared storage. It uses PHP FPM and the website directory is: /var/www/vhosts/mondomain/current/.
"current" is a symbolic link that points to a version (currently after e.g. "release/1").
Everything works fine.

The problem is that when we change the symbolic link (e.g. "release/2"), PHP FPM continues to use "release/1".
We need to do a manual reload for the change to take effect.

Is there any way to avoid this?
To ensure PHP-FPM recognizes the updated symbolic link without a manual reload, you can use the "clear_env" directive in your PHP-FPM configuration or script a reload trigger post-deployment.
 
Hi,

Sorry for my late answer.
The problem actually comes from "opcache".
If I deactivate it in "Performance booster" (JIT, realpath cache...), the modification works.

So I was thinking of using the PHP opcache_reset() function.

But I have a few questions:
- if this function is called in a PHP script for a particular site (there are several on the instances), will the reset apply to all sites?
- from what I understand, opcache storage is done in memory. In this case, there are two instances with shared storage. If the script is only called by one instance, the other is not refreshed and therefore the modification is not taken into account.

This is to fully understand before setting up on the site in production.

Thank you.

Erwan
 
So I was thinking of using the PHP opcache_reset() function.

But I have a few questions:
- if this function is called in a PHP script for a particular site (there are several on the instances), will the reset apply to all sites?
Yes, for all sites running the same PHP handler. If the site runs a dedicate PHP handler, then it would only apply to that site.
 
Back
Top