Error while proxying, error: EOF #166
-
|
Hi all, We are migrating an application from Capistrano to Kamal, and everything seems fine. However, a few, very long requests always fail with a 502 error. The application runs on Unicorn, and looking at the Rails logs it finishes properly ( {
"time":"2025-09-23T14:52:35.341439256Z",
"level":"ERROR",
"msg":"Error while proxying",
"target":"8dd0dd95b40d:80",
"path":"/graphql/longRequest",
"error":"EOF"
}
{
"time":"2025-09-23T14:52:35.341652241Z",
"level":"INFO",
"msg":"Request",
"host":"staging.myserver.com",
"port":80,
"path":"/longRequest",
"request_id":"299df8b8-12c5-41c2-ac99-ae7afd8f37fa",
"status":502,
"service":"staging-web",
"target":"8dd0dd95b40d:80",
"duration":37545983590,
"method":"POST",
"req_content_length":24802,
"req_content_type":"application/json",
"resp_content_length":6214,
"resp_content_type":"text/html; charset=utf-8",
"client_addr":"10.189.52.35",
"client_port":"19022",
"remote_addr":"x.x.x.x",
"user_agent":"Mozilla/5.0 ...",
"proto":"HTTP/1.1",
"scheme":"http",
"query":"",
"req_cache_control":"",
"req_last_modified":"",
"req_user_agent":"Mozilla/5.0 ..."
}We have noticed that it fails if the request takes more than 30 seconds, but we can't seem to change this timeout anywhere. I know 30 secs is too high, but until we optimise those pages we need to deploy as is. We started setting the
service: alkimii-staging
[...]
proxy:
response_timeout: 600
buffering: true
servers:
web:
hosts: ...
env:
clear:
ROLE: web
proxy:
healthcheck:
interval: 1
path: /up
timeout: 600
response_timeout: 600
[...]We have checked inside the kamal-proxy container that the file What else have we missed? Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
@frsantos is there anything else running between Kamal Proxy and the Rails app that could be timing out the request? For example, if you are using Thruster, it also defaults to a 30 second timeout. |
Beta Was this translation helpful? Give feedback.
@frsantos is there anything else running between Kamal Proxy and the Rails app that could be timing out the request?
For example, if you are using Thruster, it also defaults to a 30 second timeout.