• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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