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

API errors shouldn't be treated as probe errors #417

Closed
alexey-yarmosh opened this issue Aug 10, 2023 · 0 comments · Fixed by jsdelivr/globalping-probe#182
Closed

API errors shouldn't be treated as probe errors #417

alexey-yarmosh opened this issue Aug 10, 2023 · 0 comments · Fixed by jsdelivr/globalping-probe#182
Assignees

Comments

@alexey-yarmosh
Copy link
Member

Currently while collecting probe metadata if our API failed (db problems, code problems, etc.) it will send the failed to collect probe metadata message to the probe, which forces it to reconnect only in 1 hour. Instead we should reconnect in 1 hour only when we exactly know that the problem is with the probe itself. For cases when API is the root of error - probe should reconnect immediately.

Example of an API error, which caused the probe to disconnect for 1 hour:

Error: failed to collect probe metadata
    at file:///app/dist/lib/ws/middleware/probe-metadata.js:20:15
[2023-08-10 14:16:52] [ERROR] [76] [probe-metadata] timeout reached while waiting for fetchSockets response
Error: timeout reached while waiting for fetchSockets response
    at Timeout._onTimeout (/app/node_modules/@socket.io/redis-adapter/dist/index.js:568:28)
    at listOnTimeout (node:internal/timers:569:17)
    at process.processTimers (node:internal/timers:512:7)
[2023-08-10 14:16:52] [INFO] [76] [ws:error] disconnecting client 3kGpckjm0IzAEZ8fAAAT for (failed to collect probe metadata) [x.x.x.x]
[2023-08-10 14:16:52] [DEBUG] [76] [ws:error] failed to collect probe metadata
{ data: { ipAddress: 'x.x.x.x' } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants