Unable to Deploy - Failed at Reload php-fpm

I had trouble with getting a site to deploy to my staging server, so I started from scratch with Trellis installation, changing only my server information. I’m able to provision with server.yml but every time I run the deploy.sh command I hit “Reload php-fpm” and it fails.

TASK [deploy : Reload php-fpm] *************************************************
System info:
  Ansible 2.0.1.0; Darwin
  Trellis at "Add connection-related cli options to ping command"
---------------------------------------------------
reload: Unknown instance:
fatal: [104.131.176.77]: FAILED! => {"changed": true, "cmd": "sudo service php7.0-fpm reload", "delta": "0:00:00.041268", "end": "2016-05-09 19:19:38.554470", "failed": true, "rc": 1, "start": "2016-05-09 19:19:38.513202", "stderr": "reload: Unknown instance: ", "stdout": "", "stdout_lines": [], "warnings": []}
	to retry, use: --limit @deploy.retry

I found several other threads with this or a similar issue and none of those fixes have seemed to work.

Anyone familiar with why this might be happening?

1 Like

I just had the same issue, so I logged into the server and tried restart php-fpm manually. I got the same issue, but after restarting a couple of times it worked:

$ service php7.0-fpm reload
reload: Unknown instance:

$ service php7.0-fpm restart
stop: Unknown instance:
php7.0-fpm start/running, process 14924

$ service php7.0-fpm restart
php7.0-fpm stop/waiting
php7.0-fpm start/running, process 14939

Then I tried the deploy again and that worked no problem. Not sure what’s going on but that seems to have fixed it.

4 Likes

I’m getting asked for a password when I try to run this?

I had something similar after updating Trellis and reprovisioning. PHP had updated from 7.0 to 7.2. I had to disable the php7.0-fpm service, then stop it, then start the php7.2-fpm service. After that everything was OK.

Bump.

Just reporting a similar issue and fix. I’ve got a server where I put a bunch of staging sites. Now typically you’ll get the hanging deploy at reload php-fpm error because the version running on the server is different from the one you’re deploying…

But in this instance I had previously manually removed a few sites from the /srv/www/ directory. Deploys weren’t working so I tried a provision and this threw an error because there were left over files in /etc/nginx/sites-enabled/ looking for those deleted folders.

Deleting those old .conf files made the deploy work again.

This might help :smiley:

I am using Ubuntu 18.04 LTS. I got this

sudo systemctl status php7.3-fpm.service
● php7.3-fpm.service - The PHP 7.3 FastCGI Process Manager
Loaded: loaded (/lib/systemd/system/php7.3-fpm.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since রবি 2019-03-03 18:30:40 UTC; 1h 7min ago
Docs: man:php-fpm7.3(8)
Process: 15080 ExecStart=/usr/sbin/php-fpm7.3 --nodaemonize --fpm-config /etc/php/7.3/fpm/php-fpm.conf (code=exited, status=78)
Main PID: 15080 (code=exited, status=78)

মার্চ 03 18:30:40 trellis systemd[1]: Stopped The PHP 7.3 FastCGI Process Manager.
মার্চ 03 18:30:40 trellis systemd[1]: Starting The PHP 7.3 FastCGI Process Manager…
মার্চ 03 18:30:40 trellis php-fpm7.3[15080]: [03-Mar-2019 18:30:40] ERROR: [/etc/php/7.3/fpm/pool.d/www.conf:45] value is NULL for a ZEND_INI_P
মার্চ 03 18:30:40 trellis php-fpm7.3[15080]: [03-Mar-2019 18:30:40] ERROR: Unable to include /etc/php/7.3/fpm/pool.d/www.conf from /etc/php/7.3
মার্চ 03 18:30:40 trellis php-fpm7.3[15080]: [03-Mar-2019 18:30:40] ERROR: failed to load configuration file ‘/etc/php/7.3/fpm/php-fpm.conf’
মার্চ 03 18:30:40 trellis php-fpm7.3[15080]: [03-Mar-2019 18:30:40] ERROR: FPM initialization failed
মার্চ 03 18:30:40 trellis systemd[1]: php7.3-fpm.service: Main process exited, code=exited, status=78/n/a
মার্চ 03 18:30:40 trellis systemd[1]: Failed to start The PHP 7.3 FastCGI Process Manager.
মার্চ 03 18:30:40 trellis systemd[1]: php7.3-fpm.service: Unit entered failed state.
মার্চ 03 18:30:40 trellis systemd[1]: php7.3-fpm.service: Failed with result ‘exit-code’.

1 Like