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

php_fpm: Sporadic error "Failed to get metrics" #1843

Closed
steffenweber opened this issue Jul 4, 2018 · 5 comments
Closed

php_fpm: Sporadic error "Failed to get metrics" #1843

steffenweber opened this issue Jul 4, 2018 · 5 comments

Comments

@steffenweber
Copy link

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
@masci
Copy link
Contributor

masci commented 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.

@masci
Copy link
Contributor

masci commented Jul 6, 2018

@steffenweber a fix was merged on master and will be shipped with the next agent minor release.

@steffenweber
Copy link
Author

Thank you! 😃

@masci
Copy link
Contributor

masci commented Sep 6, 2018

Closing for now, feel free to reopen if the fix shipped in #1581 doesn't work

@masci masci closed this as completed Sep 6, 2018
@steffenweber
Copy link
Author

The fix works! 👍

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

No branches or pull requests

2 participants