timeout period for http responses #2865
-
Hi All, Is there a way to configure the timeout period for the HTTP responses generated by the hydra? Thanks and Regards, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @rahulagrawal refer: https://github.com/ory/graceful/blob/master/http_defaults.go |
Beta Was this translation helpful? Give feedback.
Hi @rahulagrawal
In hydra 1.10.2 we checked in code there is no config driven control for requestTimeout.
hydra uses a library "ORy's Graceful" (refer hydra/cmd/server/handler.go > http server init)
https://github.com/ory/graceful and have 10 seconds timeout value as default.
configs in http_defaults.go for request and response respectively.
// DefaultReadTimeout sets the maximum time a client has to fully stream a request (5s)
DefaultReadTimeout = 5 * time.Second
// DefaultWriteTimeout sets the maximum amount of time a handler has to fully process a request (10s)
DefaultWriteTimeout = 10 * time.Second
refer: https://github.com/ory/graceful/blob/master/http_defaults.go