PostHog / posthog

🦔 PostHog provides open-source product analytics, session recording, feature flagging and A/B testing that you can self-host.
https://posthog.com
Other
20.73k stars 1.24k forks source link

HTTP 5xx when cancelling in-flight queries #11603

Open guidoiaquinti opened 2 years ago

guidoiaquinti commented 2 years ago

Bug description

With https://github.com/PostHog/posthog/pull/11485 we are now cancelling unnecessary in-flight requests removing some load from CH.

Looking at the logs cancelling those requests is making the one in-flight throwing HTTP 500. We should likely catch CHQueryErrorQueryWasCancelled and return a non HTTP 5xx status code.

How to reproduce

  1. run long running query via an HTTP endpoint
  2. cancel that request
  3. seeing a HTTP 5xx in the logs

Environment

Additional context

N/A

posthog-bot commented 1 week ago

This issue hasn't seen activity in two years! If you want to keep it open, post a comment or remove the stale label – otherwise this will be closed in two weeks.