You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using instrumental in a PHP based websocket server with infinite timeout. I realise that this probably isn't instrumental's intended use case but, after a few minutes I'll get the following error when trying to write to a metric:
[2018-10-27 12:34:18] instrumental.ERROR: Exception caught: fwrite(): send of 63 bytes failed with errno=32 Broken pipe #0 [internal fu...
Now, surprisingly, instrumental is able to recover from this and continues to write metrics the next time it's attempted until it falls over again and recovers again - the metrics we're recording through instrumental aren't mission critical and as such this behaviour is acceptable.
Is there any method to catch this exception in my code to prevent it being output to the log file?
Thank you
The text was updated successfully, but these errors were encountered:
How frequently are you sending metrics with that agent? Is it a case of metrics being sent regularly and then the socket dying after a few minutes, or is it several minutes of idle time followed by the next send failing?
Catching the exception is trickier... you might be able to give the agent its own logger and then set the log level to FATAL, or redirect its log output into /dev/null. I don't REALLY recommend that last one, as it would catch any other exceptions and throw them away.
I'm using instrumental in a PHP based websocket server with infinite timeout. I realise that this probably isn't instrumental's intended use case but, after a few minutes I'll get the following error when trying to write to a metric:
[2018-10-27 12:34:18] instrumental.ERROR: Exception caught: fwrite(): send of 63 bytes failed with errno=32 Broken pipe #0 [internal fu...
Now, surprisingly, instrumental is able to recover from this and continues to write metrics the next time it's attempted until it falls over again and recovers again - the metrics we're recording through instrumental aren't mission critical and as such this behaviour is acceptable.
Is there any method to catch this exception in my code to prevent it being output to the log file?
Thank you
The text was updated successfully, but these errors were encountered: