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

Slow response times #2680

Closed
hsheth2 opened this issue Dec 5, 2020 · 2 comments
Closed

Slow response times #2680

hsheth2 opened this issue Dec 5, 2020 · 2 comments
Labels
bug Something isn't working right

Comments

@hsheth2
Copy link

hsheth2 commented Dec 5, 2020

Bug description

Processing for requests is extremely slow. Some requests take up to 13 seconds to return a response.
image

I'm running self-hosted within docker on an 8 core machine with ~200gb ram. Posthog's web container is basically consuming 1-2 full cores, which would be fine if it was able to respond to every request reasonably fast.

Posthog is under reasonably high load. We've been running it for a couple days on this machine, and these are the metrics:
image

Expected behavior

Ideally it should be responding to clients within 100ms, and do the rest of its processing asynchronously.

How to reproduce

  1. Run posthog in with docker-compose
  2. Place posthog under reasonably high load

Environment

  • PostHog cloud or self-managed? self-managed
  • PostHog version/commit - 1.18.0 (via docker hub's latest tag)

Additional context

It does not seem like a resource constraint issue - the machine has plenty of CPU and memory to spare, and disk/network are not the bottlenecks (iowait and softirq are very low, max 500kb/s traffic on a 300Mb/s ethernet link).

Thank you for your bug report – we love squashing them!

@hsheth2 hsheth2 added the bug Something isn't working right label Dec 5, 2020
@timgl
Copy link
Collaborator

timgl commented Dec 7, 2020

Hey @hsheth2, thanks for raising this. We actually do the processing asynchronously but the library we use is very slow. We're working on replacing LZstring with gzip for compression to make this a lot faster, and we're also working on a Go endpoint for ingestion that should be even faster. Hope that helps!

@hsheth2
Copy link
Author

hsheth2 commented Dec 20, 2020

Looks like the gzip compression in v1.19.0 fixes this. Thanks!

@hsheth2 hsheth2 closed this as completed Dec 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working right
Projects
None yet
Development

No branches or pull requests

2 participants