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

Ensure there is always at least one PHP-FPM pool defined #682

Merged
merged 1 commit into from
Nov 6, 2016

Conversation

fullyint
Copy link
Contributor

@fullyint fullyint commented Nov 5, 2016

History

Occasionally, the Start php7.0-fpm service task will fail with the error below.

Job for php7.0-fpm.service failed because the control process exited with
error code. See "systemctl status php7.0-fpm.service" and "journalctl -xe"
for details.

#642 took a first step to prevent this error and the scenario as presented in discourse.roots.io/t/7444. Some of the reports in discourse.roots.io/t/7418 were probably related.

News

The error can still occur when the playbook is rerun after previously failing between these two tasks:

Between these two tasks, no PHP-FPM pool defined. The systemctl status php7.0-fpm.service reveals ERROR: No pool defined. at least one pool section must be specified in config file.

Unfortunately the playbook occasionally fails between these two tasks, e.g., due to connectivity issues while downloading a dependency.

Replicate

To replicate the problem, add this task to the end of roles/php/tasks/main.yml:

- fail:
    msg: provision again and watch the 'Start php7.0-fpm service' task fail

Then run the server.yml twice and see the error in question on the second run.

Resolution

This PR resolves the issue by removing the default pool only after the new WP pool is created.

@swalkinshaw
Copy link
Member

Makes sense :shipit:

@fullyint fullyint merged commit e6bf2ef into master Nov 6, 2016
@fullyint fullyint deleted the php-fpm-pool branch November 6, 2016 02:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants