-
Notifications
You must be signed in to change notification settings - Fork 61
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
Intermittent request aborted from proxied service #235
Comments
Hey @dipack95, I'm not sure what "request aborted" means. Are you sure the upstream service responds with a valid The Piko agent doesn't care what status code the upstream returns, so as long as it received a valid HTTP response it will be routed back to the client. What do the agent logs show? You linked to this, which is only called if a network error occurs during the HTTP request, and logs what the error is (as a warning). Also can you check whether the logs say the agent was disconnected from the cluster at any point |
Yeah what I think is happening here is that the connection between the service and the Piko agent is being broken such that the Piko agent never receives the response from downstream, hence the Piko agent log for `request aborted` response from service{
"msg": "request",
"request": {
"duration": "33.47156ms",
"path": "redacted",
"response_headers": {
"X-Content-Type-Options": [
"nosniff"
],
"Content-Type": [
"application/json"
]
},
"method": "POST",
"proto": "HTTP/1.1",
"host": "piko-cluster-url",
"request_headers": {
"X-Transcend-Token": [
"redacted"
],
"Accept": [
"application/json"
],
"X-Datadog-Parent-Id": [
"redacted"
],
"Connection": [
"close"
],
"X-Datadog-Trace-Id": [
"redacted"
],
"X-Forwarded-Proto": [
"https"
],
"X-Piko-Authorization": [
"redacted"
],
"Accept-Encoding": [
"gzip"
],
"X-Data-Silo-Type": [
"redacted"
],
"X-Forwarded-Port": [
"8000"
],
"X-Amzn-Trace-Id": [
"redacted"
],
"X-Sombra-Request-Id": [
"redacted"
],
"X-Piko-Forward": [
"true"
],
"X-Datadog-Sampling-Priority": [
"2"
],
"X-Sombra-Organization-Id": [
"redacted"
],
"X-Forwarded-For": [
"redacted"
],
"Content-Length": [
"2868"
],
"X-Request-Type": [
"redacted"
],
"X-Sombra-Organization-Uri": [
"redacted"
],
"Content-Type": [
"application/json"
],
"X-Data-Silo-Id": [
"redacted"
],
"X-Piko-Endpoint": [
"redacted"
]
},
"status": 502
},
"level": "Error",
"service": "service-name",
"subsystem": "proxy.http.access",
"source": "stderr",
"timestamp": 1740762834954,
"ts": "2025-02-28T17:13:54.954Z",
"endpoint-id": "redacted"
} There's also these really interesting log lines that are logged just before the log line above: [
{
"msg": "proxy request",
"level": "Error",
"service": "redacted",
"subsystem": "proxy.http",
"source": "stderr",
"error": "EOF",
"timestamp": 1740762834954,
"ts": "2025-02-28T17:13:54.953Z",
"endpoint-id": "redacted"
},
{
"log": "",
"level": "Error",
"service": "redacted",
"source": "stderr",
"timestamp": 1740762834954
}
] Our agents are not configured to log any specific subsystems, so if there's some you recommend enabling, that aren't already enabled by default, please let me know
I've checked the logs, and it has not logged the We've enabled the following [
'admin',
'cluster',
'proxy.access',
'proxy.http',
'proxy.tcp',
'reporter',
'server',
'upstream',
] Attached is the warning log from the Piko cluster for the same request Piko Cluster log for the same request{
"host": "host-name",
"service": "service-name",
"message": "request",
"attributes": {
"request": {
"duration": "35.620829ms",
"path": "redacted",
"response_headers": {
"X-Content-Type-Options": [
"nosniff"
],
"Content-Length": [
"33"
],
"Date": [
"Fri, 28 Feb 2025 17:13:54 GMT"
],
"Content-Type": [
"application/json"
]
},
"method": "POST",
"proto": "HTTP/1.1",
"host": "piko-cluster-url",
"request_headers": {
"X-Transcend-Token": [
"redacted"
],
"Accept": [
"application/json"
],
"X-Datadog-Parent-Id": [
"redacted"
],
"X-Datadog-Trace-Id": [
"redacted"
],
"X-Forwarded-Proto": [
"https"
],
"X-Piko-Authorization": [
"redacted"
],
"X-Data-Silo-Type": [
"redacted"
],
"X-Forwarded-Port": [
"8000"
],
"X-Amzn-Trace-Id": [
"redacted"
],
"X-Sombra-Request-Id": [
"redacted"
],
"X-Piko-Forward": [
"true"
],
"X-Datadog-Sampling-Priority": [
"2"
],
"X-Sombra-Organization-Id": [
"redacted"
],
"X-Forwarded-For": [
"redacted"
],
"Content-Length": [
"2868"
],
"X-Request-Type": [
"redacted"
],
"X-Sombra-Organization-Uri": [
"redacted"
],
"Content-Type": [
"application/json"
],
"X-Data-Silo-Id": [
"redacted"
],
"X-Piko-Endpoint": [
"redacted"
]
},
"status": 502
},
"level": "warn",
"subsystem": "proxy.access",
"ts": "2025-02-28T17:13:54.955Z"
}
}
|
I agree, therefore it doesn't sound like there is an issue with Piko (but is instead an issue with the service)? So can I close this issue? (Or I might be misunderstanding?) |
@andydunstall I was wondering if you have ever experienced something similar with your usage of Piko! Anyway, I plan on modifying the parameters here, and seeing if that makes a difference in the aborted connections we're seeing. I will keep you posted here on what I find - I'd appreciate it if you could keep this issue open for a bit longer. |
Nope I haven't
Those are for dial timeouts and idle connections? I'm not sure that will affect "active" connections? Plus if the issue is a timeout I'd expect a timeout error rather than
Yep sure! |
For context here, the agent is used to proxy a service that can frequently take a few minutes to synchronously respond, but usually responds within a few seconds. The piko cluster is currently behind an AWS ALB, and AFAIK the AWS ALB does not send any packets to open connections to keep them alive, which can be an issue with the aforementioned proxied service. My hunch here is that the lower idle connection limit, and lower (compared to our service's expectations) keep alive timeouts in the piko agent, might be causing some open connections to be terminated unceremoniously. I plan on taking a look at this next week, so hopefully I have an update for you one way or another! |
Hi Andy -- we've been running Piko in Prod for a couple of weeks now, and have noticed that the services proxied by Piko will sometimes throw
request aborted
errors when responding to requests.The error message is:
Our setup is:
request aborted
issuesrequest aborted
status message, with an error code of 400, Piko converts that into a 502upstream unreachable
when reading the response from the Piko clsuter -- presumably due to this codeThings we've tried:
Accept-Encoding: identity
to prevent the Golang builtin http transporter from messing around with response typesDo you have any thoughts around why such a thing might be happening? Please let me know if you'd like more details!
The text was updated successfully, but these errors were encountered: