-
Notifications
You must be signed in to change notification settings - Fork 55
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
Socket hang up with long running request to service #228
Comments
Hi @codedge, can you post a copy of the response you're getting? The string Does it log the request when it fails? |
Sorry for the confusion. 1. Resolving the At first I got a This is solved ✔️ 2. The This error is returned by Error in Error in Postman I tend to say this is some I also found this link, which talks about the It logs the request towards the backend service, but it does not log the response coming back. |
.. and I can confirm, that changing the func runHandler(ctx context.Context, wg *sync.WaitGroup, name, addr string, handler http.Handler) {
srv := &http.Server{
Addr: addr,
Handler: handler,
ReadTimeout: 5 * time.Second,
WriteTimeout: 60 * time.Second,
IdleTimeout: 120 * time.Second,
}
// ...
} everything works flawlessly. Do you think you can make this configurable via the limits plugin? UpdateI can see that there are three server instances runnning - Ideally the user is able to configure this for each of these three. I would create a PR (if you don't find time). |
Thanks for doing the debugging @codedge, that makes sense, if the write timeout is set to 10s by default it will be closing the socket before your service has responded. It would be useful to have bramble craft a timeout response in that situation but we can make the socket settings tuneable as well. The |
Is there a release planned to include the new configuration? |
Hey!
I experience a weird behaviour when having long running requests in my service connected to the gateway.
I run a PHP-based service behind the gateway, that sometimes needs up to 45s to return the response. In 90% of the cases the response is not returned by the gateway and instead I get a
Socket hang up
back.I already enabled the Limits plugin and put this there
This removes the initial
reached timeout
error message, but still I have the problem that the connection between the gateway and the service somehow gets lost.I am 100% sure, that the response is correct and is returned by the (backend) service properly. When calling the GraphQL endpoint of the backend service directly, there is no issue at all.
Does that somehow sound familiar to you or any hint where to look?
Thanks!
The text was updated successfully, but these errors were encountered: