-
Notifications
You must be signed in to change notification settings - Fork 20
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
Exporter unavailable during socket timeouts #17
Comments
thanks for submitting an Issue @frenkye Not aware of any flag you could use to further debug, but I'm not actively developing Go or prometheus exporters. Since you mentioned you're monitoring a large number of hosts, perhaps you'd need tighter timeouts when opening connections? https://github.com/tomasen/fcgi_client func DialTimeout(network, address string, timeout time.Duration) (fcgi *FCGIClient, err error) If you replace the Dial invocation with DialTimeout, and specify a shorter timeout (say 2/5 sec) would that help? |
@Lusitaniae Thank you for the tip. I'll give it a look and try this change. 👍 |
@Lusitaniae I have set up test enviroment where i have dummy page with php sleep(10) via php-fpm with max_children = 1 for tracing requests. Changed both Dials for timeout with timeout That seemed wierd. I did some checking via strace
On my test, during sleep request:
On server which had target down and fpm get overfilled by requests with full backlog:
It seems its not problem in connection to socket, but in wating for the query on socket to finish. Because backlog allow this connection before is overflooded and start rejecting connections. Any idea how to limit the query on socket for like 5s and not the connection? |
Good progress so far. I had another look at the fcgi client and the net interface https://golang.org/pkg/net/#UnixConn.SetDeadline It offers some setDeadline methods for establishing TCP/UDP/socket connections. Perharps the fcgi_client needs to implement those, which it doesn't at the moment. |
I had conversation with our dev team and they will have loot at this in few days. If we find solution, they will make PR. |
Hi,
we are using this exporter for a while and I notice patterns, where exporter start logging errors (lines before end), then exporter hang as well. Is there any debug option how could I can track this more?
I would expect behavior that exporter should be responsive all the time, but report
php_fpm_up{socket_path="..."} 0
. Now we loosing all data when single socket is down.Using exporter:
phpfpm_exporter, version 0.5.0 (branch: HEAD, revision: 9cb855b)
Started under supervisor:
Exporter error log (Prague so UTC+2):
Screens from grafana dashboard (Prague so UTC+2):
Prometheus graf on
up
metric for job (UTC):The text was updated successfully, but these errors were encountered: