Skip to content
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

Return consistent HTTP 504 error responses for query timeouts #10028

Closed
sirianni opened this issue Jun 12, 2020 · 0 comments · Fixed by #10464
Closed

Return consistent HTTP 504 error responses for query timeouts #10028

sirianni opened this issue Jun 12, 2020 · 0 comments · Fixed by #10464

Comments

@sirianni
Copy link

Affected Version

0.17.0

Description

Expected Behavior

When a Druid query hits the timeout set in the query context, a consistent error response should be returned, ideally with an HTTP 504 error code.

Actual Behavior

In practice, we see several different responses returned for this scenario, all with an HTTP 500 error code. This makes it difficult to detect and handle the error in client code.

{
  "error": "Unknown exception",
  "errorMessage": "Sequence iterator timed out waiting for data",
  "errorClass": "org.apache.druid.java.util.common.RE",
  "host": null
}
{
  "error": "Unknown exception",
  "errorMessage": "Query[3e115fa5-abf6-4496-8632-2b0196300e7c] url[http://druid-prod-middle-manager-38.druid-prod-middle-manager.druid-prod.svc.cluster.local:8100/druid/v2/] timed out.",
  "errorClass": "org.apache.druid.java.util.common.RE",
  "host": null
}
{
  "error": "Unknown exception",
  "errorMessage": "Query[8245c738-799b-4901-8d00-6a64e1e55b81] url[http://druid-prod-historical-23.druid-prod-historical.druid-prod.svc.cluster.local:8083/druid/v2/] timed out.",
  "errorClass": "org.apache.druid.java.util.common.RE",
  "host": null
}
{
  "error": "Query timeout",
  "errorMessage": "Timeout waiting for task.",
  "errorClass": "java.util.concurrent.TimeoutException",
  "host": "druid-prod-historical-0.druid-prod-historical.druid-prod.svc.cluster.local:8083"
}
@sirianni sirianni changed the title Consistent HTTP 504 error responses for query timeouts Return consistent HTTP 504 error responses for query timeouts Jun 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants