-
-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FPM improvements #425
FPM improvements #425
Conversation
iliajie
commented
Jul 29, 2022
- Set PHP-FPM pool file permission - This is required for virtual server owners to edit (when allowed) pool config file
- Fix to print better message when no PHP config changed upon saving
- Default children value cannot be lower than max_spare_servers
- Fix sanity check (cannot be lower than default pm.max_spare_servers)
- Fix to update text and help to accommodate both FPM and FCGId
- Update help and language translations
- Fix sanity check (cannot be lower than default pm.max_spare_servers)
This is required for virtual server owners to edit (when allowed) pool config file
.. otherwise PHP-FPM server will die on the next restart
Although, Then we should change it on |
No, I have a better idea. Will add a commit to the PR after the walk.. |
I think I fixed all known PHP related issues (with Apache) ... |
save_phpmode.cgi
Outdated
@@ -11,7 +11,8 @@ $canv = &can_edit_phpver($d); | |||
$can || $canv || &error($text{'phpmode_ecannot'}); | |||
&require_apache(); | |||
$p = &domain_has_website($d); | |||
|
|||
@modes = &supported_php_modes($d); | |||
($newmode) = grep { $in{'mode'} =~ /^$_/ } @modes; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why use a regexp here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙂 This is because (most probably a theme bug, which I will check on a bit later today), when you hit enter to submit a form it adds mode
two time to the payload which makes $in{'mode'}
set to something like fpmfpm
..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hold on, we should fix that bug in instead of working around it here!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hold on, we should fix that bug in instead of working around it here!!
Absolutely, although this was before I realized that it was a bug! Also, this a small improvement to the code here anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming that bug is fixed, can't this line just be $newmode = $in{'mode'};
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, let's do it. Fixed.
Assuming that bug is fixed,
Yes, I have been fighting with it today for many hours to make it right on the theme side ... finishing final tests ..
$defchildren = 9999; | ||
} | ||
else { | ||
$defchildren = $defchildren >= 5 ? $defchildren : 5; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this limit of 5 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this limit of 5 ?
Check this updated help, it explains it - help/phpmode_children.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will setting it to less than 5 create an invalid config that can't be loaded by PHP?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, unless pm.max_spare_servers
also manually decrease. But we have it hard coded upon pool creation time .. so I decided to make it easy but not obscure ..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, makes sense!
Thanks. I will create another PR if needed when taking another deep look into it .. |