Skip to content
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

Add a warning when FPM is used with MPM_PREFORK #7516

Merged
merged 1 commit into from
Jul 6, 2022

Conversation

nickvergessen
Copy link
Member

@nickvergessen nickvergessen commented Jul 5, 2022

Bildschirmfoto vom 2022-07-05 12-27-03

Fix #7499

@nickvergessen nickvergessen added 3. to review bug feature: settings ⚙️ Settings and config related issues labels Jul 5, 2022
@nickvergessen nickvergessen added this to the 💚 Next Major (25) milestone Jul 5, 2022
@nickvergessen nickvergessen requested a review from danxuliu July 5, 2022 10:27
@nickvergessen nickvergessen marked this pull request as ready for review July 5, 2022 10:57
@nickvergessen nickvergessen force-pushed the bugfix/7499/fpm-prefork-warning branch from 17a5122 to 9e3ee51 Compare July 5, 2022 10:58
Copy link
Member

@danxuliu danxuliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Funny fact, apachectl -M can fail when executed through the web server even if it works when executed as root if any of the modules needs to read a file accessible only by root (for example, the SSH certificates). Of course that is a corner case, but I wonder if that could fail too in more common scenarios.

Independently of that, what about SystemKeeper's suggestion to rely on the .htaccess file? That would require mod_env to be set, but that is needed anyway for the default setup of Nextcloud (SetEnv is used in the main .htaccess file and if the variable is not found an error is shown in the setup checks).

And for reference, I was able to reproduce the performance problem when using FPM and mpm_prefork if several clients were long polling.

@nickvergessen
Copy link
Member Author

The problem is this would need to go into the root .htaccess file of Nextcloud as that is where index.php is what serves the settings page?

@nickvergessen nickvergessen requested a review from danxuliu July 6, 2022 12:01
@danxuliu
Copy link
Member

danxuliu commented Jul 6, 2022

The problem is this would need to go into the root .htaccess file of Nextcloud as that is where index.php is what serves the settings page?

Mmm, right, htaccess files do not seem to have effect for PHP files in subdirectories if they are loaded by other PHP files rather than directly by the web server :-(

Copy link
Member

@danxuliu danxuliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a fan of calling apachectl, but apparently that approach is the only one that (except on corner cases) works 🤷, so 👍

But, what happens if NGINX is used instead?

@nickvergessen
Copy link
Member Author

It bails out with being a "valid configuration"
So we are not showing the error.

@nickvergessen
Copy link
Member Author

Failing test is fixed by #7517

So merging

@nickvergessen nickvergessen merged commit 076db31 into master Jul 6, 2022
@nickvergessen nickvergessen deleted the bugfix/7499/fpm-prefork-warning branch July 6, 2022 13:40
@prismopensource
Copy link

Test still fails when running Nextcloud on a semi popular web control panel I'm afraid, when I check on a standard Apache with PHP 8.2 in php-fpm mode:

# httpd -V | grep 'MPM'
Server MPM:     event

Though I'm still getting a "It seems that the PHP and Apache configuration is not compatible. Please note that PHP can only be used with the MPM_PREFORK module and PHP-FPM can only be used with the MPM_EVENT module." warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review bug feature: settings ⚙️ Settings and config related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Warn about FPM + prefork misconfiguration
3 participants