• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

Resolved PHP-FPM change static to ondemand

moswak

Regular Pleskian
Hi,

in last Update this bug was fixed
"The pm PHP-FPM directive of a domain created under a default service plan took the static value instead of default ondemand"

how i change the directive of all existing domains from static zu ondemand ?
 
Create file, ppp, for example, with following content:

# cat ppp
pm = ondemand


Then run following command:

# for i in `mysql -uadmin -p\`cat /etc/psa/.psa.shadow\` psa -Ns -e "select name from domains"`; do /usr/local/psa/bin/subscription_settings --update-php-settings $i -settings ppp; done
 
Thanks IgorG

If one adds the max_children = 50 to it, this will also change....

# cat ppp
pm.max_children = 50
pm = ondemand
 
I did something similar to disable pm.static on locked subscriptions.
Code:
cat /tmp/staticpm
pm = ondemand

while read -r subscription; do echo $subscription; plesk bin subscription_settings --update-php-settings $subscription -settings /tmp/staticpm; done < <(plesk bin php_handler --get-usage -id plesk-php71-fpm|awk 'FNR > 1 {print $2}')

Do this for each enabled php-fpm handler id you find in:
Code:
plesk bin php_handler --list
 
I'm getting an annoyed customer that has its site ruined from time to time because "short_open_tag" is set to "off" by something Plesk does.
This happened again this week.
I did some tests, but it seems this command had nothing to do with it, but I do suspect this update.

We should be able to rely on those settings to stick.
I already created a ticket regarding that setting. It is also getting lost on a restore of a backup and a migration.

Maybe other settings are getting reset too, but this one becomes obvious for some sites we host. So if this is investigated then check if it involves other settings.
 
Back
Top