This provides a _ping.php file which can be used in load balancers to check if the instance is ok
MIT License
Bot releases are visible (Hide)
Published by ragnarkurmwunder about 1 year ago
Renamed _ping.custom.php
to _ping.custom.example.php
to avoid delays in misconfigured systems.
composer.json
must contain a proper dropin-paths
configuration or this package will pollute the webroot.
Published by ragnarkurmwunder over 1 year ago
syslog()
or error_log()
.Credits go to @hkirsman for the improvements of this release!
Published by ragnarkurmwunder over 1 year ago
mtime
in the filename.Published by ragnarkurmwunder over 1 year ago
Fix the NFS mtime
issue by storing the timestamp in the filename.
Published by ragnarkurmwunder over 1 year ago
Try to handle NFS shortcomings that show up especially when the ping is executed very frequently on a multi-container environment, in parallel. The main problems are:
Published by ragnarkurmwunder over 1 year ago
Published by ragnarkurmwunder over 2 years ago
Ping failed when it could not write to the public dir.
This is fixed now and covered by two new additional tests.
Published by ragnarkurmwunder over 2 years ago
Published by ragnarkurmwunder over 2 years ago
Published by ragnarkurmwunder over 2 years ago
Published by ragnarkurmwunder over 2 years ago
Published by ragnarkurmwunder over 2 years ago
drupal/drupal
require from composer.json
Published by ragnarkurmwunder over 2 years ago
Published by ragnarkurmwunder over 2 years ago
phpcs
(standards, PHP compatibility), phpstan
php _ping.php
defaults to debug mode, and reveals the debug token.Published by ragnarkurmwunder over 2 years ago
composer.json
needs a different syntax - see README.curl()
, cluster support, advanced configurability_ping.php
developers there is now Lando testing env. See README.https://example.com/_ping.php?debug=hash
Look up the hash
value in README.
INTERNAL ERROR 500
db error result_count=0 expected=1 Master database invalid results.
memcache disabled
redis disabled
elasticsearch disabled
fs-scheme-create success
fs-scheme-delete success
custom-ping disabled
19.865 ms - bootstrap
10.680 ms - check_fs_scheme_create
1.149 ms - check_fs_scheme_delete
1.045 ms - check_custom_ping
0.831 ms - check_db
0.013 ms - check_memcache
0.012 ms - check_redis
0.010 ms - check_elasticsearch
33.794 ms - total
All ping log entries are prefixed by ping:
.
There are 3 types of records:
Mar 29 19:21:17 hostname php: ping: slow: check_db: duration=1003.642356 ms
Mar 30 15:54:59 hostname php: ping: error: unset: bootstrap(): SQLSTATE[HY000] [2002] No such file or directory
Mar 30 15:54:59 hostname php: ping: error: db: check_db(): SQLSTATE[HY000] [2002] No such file or directory
Mar 30 15:54:59 hostname php: ping: error: fs-scheme-create: check_fs_scheme_create(): \Drupal::$container is not initialized yet.
Mar 30 16:00:00 hostname php: ping: warning: memcache: host=localhost port= 11211 response='END' - Unexpected response