question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

php_fpm: Sporadic error "Failed to get metrics"

See original GitHub issue

Requesting the PHP-FPM status URL can sporadically fail with an HTTP 503 error “scoreboard already in used”.

See: https://github.com/php/php-src/blob/d84ef967424343abcc48b8f945d5e7807f1c1e09/sapi/fpm/fpm/fpm_status.c#L96

Maybe Datadog could retry once or twice before raising an error?

ERROR (php_fpm.py:91): Failed to get metrics from http://localhost/fpm-status.
  Error 503 Server Error: Service Unavailable for url: http://localhost/fpm-status?json=True
ERROR (__init__.py:829): Check 'php_fpm' instance #0 failed
  Traceback (most recent call last):
    File "/opt/datadog/5.25.0/agent/checks/__init__.py", line 812, in run
      self.check(copy.deepcopy(instance))
    File "/opt/datadog/latest/venv/lib/python2.7/site-packages/datadog_checks/php_fpm/php_fpm.py", line 74, in check
      raise status_exception  # pylint: disable=E0702
  HTTPError: 503 Server Error: Service Unavailable for url: http://localhost/fpm-status?json=True

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mascicommented, Jul 4, 2018

Hi @steffenweber thanks for the detailed report. Not sure how often and for how long we can incur in that lock but a retry policy seems easy to add, going to schedule some work, will keep this issue updated.

0reactions
steffenwebercommented, Sep 6, 2018

The fix works! 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Kubernetes php-fpm custom metrics - Internal error occurred
I installed prometheus, the prometheus-adapter and the exporter as sidecar to my PHP-Application. At the prometheus' UI get the correct metrics.
Read more >
PHP/FPM/Nginx Issue: Runs fine for a hours, then maxes FPM ...
2-fpm.sock failed (11: Resource temporarily unavailable) while connecting to upstream ), resulting in 502 errors. [15- ...
Read more >
Monitoring PHP - IBM
In order to thoroughly monitor PHP-FPM metrics, you need to enable the status ... Without it, the sensor will fail to load and...
Read more >
PHP70-FPM ERROR: unable to read what child say: Bad file ...
I am continuously receiving following errors in my `php-fpm` logs. I have read and tried some similar question available on serverfault.com ...
Read more >
PHP-FPM is failing after reboot with error 502 - Linode
For some time now I am using Laravel Forge (ubuntu 16.04) on linode on a 1GB plan which has worked like a charm...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found