Go to All Forums

Clarification on timeout field for REST API monitors

Docs/UI seem to indicate the 'Timeout/Connection Timeout' field only applies to the time taken to establish the connection. However we could notice that requests to server are timed out from the client (i.e Site24x7) when the request takes more than ~30s. However the this timeout seems to happen at random points in time between 30s-60s (60s is the maximum, I've observed as a I've a 60s timeout configured at server. ) Can anyone clarify what timeout options we can configure for a REST API monitor?

* According to https://registry.terraform.io/providers/site24x7/site24x7/latest/docs/resources/rest_api_monitor,
```
(Number) Timeout for connecting to website. Default value is 10. Range 1 - 45.
```

* On the UI

Like (2) Reply
Replies (3)

Hi,

Greetings from Site24x7.

The configurable timeout field in the monitor form is the connection timeout which we wait for the connection to establish. However, we have a another timeout field in our backend called "Idle Socket Timeout", which is the time we wait to receive full response from the server and it is set to 30 seconds by default.
If the server failed to send full response within 30 seconds, we report as "The response could not be received within 30 seconds from the Zylker.com"
 
In this case, if your API take more than 30 seconds to respond and it is an expected behavior and since the idle socket timeout is not configurable from your side, I request you to kindly contact our support, [email protected]  with the monitor information so that we can increase it from our end.
 
Regards,
Jenzo
Site24x7
Like (0) Reply

Thanks for the response @jenzosamuel.thomas

Could you please clarify below points as well?
* What's the expected status of the monitor, if the backend continuously takes more than the "Idle Socket Timeout" to respond. I assume it should go in to 'DOWN' state?
* We observed that whenever a timeout happens, request duration varies. e.g: in the below instance it took ~40s. Is this expected?
Like (0) Reply

Hi,

What's the expected status of the monitor, if the backend continuously takes more than the "Idle Socket Timeout" to respond. I assume it should go in to 'DOWN' state?

 - Yes, The montior will go down. 

 We observed that whenever a timeout happens, request duration varies. e.g: in the below instance it took ~40s. Is this expected?

 - Based on the HTTP events, it seems the whole response was not received.

As pointed before, 30 seconds is the default idle socket timeout. So the request should end at 30 seconds. But we might increase the socket timeout for that monitor. In that case 40 seconds is expected. So without monitor details, it is hard to tell this behaviour.

We have an option in our threshold profile which can be used to supress the response timeout error.

https://www.site24x7.com/help/admin/configuration-profiles/threshold-and-availability/website.html#:\~:text=Notify%20in%20case%20of%20read%20timeout

Regards,

Jenzo

Site24x7

Like (0) Reply

Was this post helpful?