Getting context deadline exceeded error when using REST API login every hour

Hi I have test app which every hour login to mender server and perform some actions. From time to time I see that login fails with error:

context deadline exceeded

Any advice how to resolve this? Is polling every hour too much? Server version 2.1.0



Also one more thing which is REST API related: shouldn’t return also total-number of devices so pagination can be then done easily (similar to: Thanks.

@0lmi do you have anything to add here? I suspect the context deadline is related to rate limiting.

@MarekBelisko It doesn’t look like application response error and most likely this means that the scrape request timed out.
Might be some network related issues or server slowness. If nothing in api-gateway logs than that is what I would check first. Also might be an option to try to increase scrape timeout in your test app.

Hello @MarekBelisko, context deadline exceeded means that the request timed out. This usually happens if hit the nginx (api gateway) timeout, which defaults to 60 seconds. It is quite strange it happens when you log in, though, because it is unlikely it can take so long to get back the response.

Do you know the response time, when you get back this error message?
Is your mongodb always reachable, and does DNS resolution work fine from the Mender server containers?

@drewmoseley rate limiting would reply back with 429 Too Many Requests