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 ping support to fpm for health checks #54

Open
andypost opened this issue Sep 17, 2019 · 3 comments
Open

Add ping support to fpm for health checks #54

andypost opened this issue Sep 17, 2019 · 3 comments
Labels

Comments

@andypost
Copy link
Contributor

andypost commented Sep 17, 2019

Also would be great to make it configurable
https://github.com/wodby/php/blob/master/7/templates/zz-www.conf.tmpl#L28

https://github.com/wodby/php/search?q=health&type=Commits

@andypost
Copy link
Contributor Author

andypost commented Sep 6, 2022

Looks we have to add it to use k8s, the script is https://github.com/renatomefi/php-fpm-healthcheck#enable-php-fpm-status-page

@andypost
Copy link
Contributor Author

andypost commented Jun 7, 2023

For nginx unit it could use curl

/var/www/html/web # curl --unix-socket /run/control.unit.sock http://localhost/status/applications/drupal/processes/running
1
var/www/html/web # curl --unix-socket /run/control.unit.sock http://localhost/status/
{
	"connections": {
		"accepted": 2,
		"active": 0,
		"idle": 0,
		"closed": 2
	},

	"requests": {
		"total": 2
	},

	"applications": {
		"drupal": {
			"processes": {
				"running": 1,
				"starting": 0,
				"idle": 1
			},

			"requests": {
				"active": 0
			}
		}
	}
}

@andypost
Copy link
Contributor Author

andypost commented Jun 7, 2023

to wait for postgresql better to use vendor/bin/drush sqlq "SELECT 1" so it

  • Drupal configured and can find database connection
  • DB is active and can execute queries

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant