0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-22 08:15:44 +01:00
posthog/bin
Harry Waye 3813795d22
chore(gunicorn): increase thread count for workers (#11507)
* chore(gunicorn): increase thread count for workers

We currently run with 2 worker processes each with 4 threads. It seems
occasionally we see spikes in the number of pending requests within a
worker in the 20-25 region. I suspect this is due to 4 slow requests
blocking the thread pool.

I'd suggest that the majority of work is going to be IO bound, thus it's
hopefully going to not peg the CPU. If it does then it should end up
triggering the HPA and hopefully resolve itself :fingerscrossed:

There is however gzip running on events, which could be intensive
(suggest we offload this to a downstream at some point). If lots of
large requests come in this could be an issue. Some profiling here
wouldn't go amiss.

Note these are the same settings between web and event ingestion
workload. At some point we may want to split.

I've added a Dashboard for gunicorn worker stats
[here](https://github.com/PostHog/charts-clickhouse/pull/559) which we
can monitor to see the effects.

Aside: if would be wise to be able to specify these settings from the
chart itself such that we do not have to consider chart/posthog version
combos, and allow tweaking according to the deployment.

* reduce to 8 threads
2022-08-26 10:36:40 +00:00
..
check_kafka_clickhouse_up
copy-scripts-recorder
deploy-hobby
docker
docker-backend
docker-dev
docker-dev-web
docker-frontend
docker-migrate
docker-server chore(gunicorn): increase thread count for workers (#11507) 2022-08-26 10:36:40 +00:00
docker-worker chore(dev): clean up background jobs on EXIT and prop. exit code (#10916) 2022-07-21 13:32:38 +00:00
docker-worker-beat
docker-worker-celery chore(dev): clean up background jobs on EXIT and prop. exit code (#10916) 2022-07-21 13:32:38 +00:00
e2e-test-runner feat(data-management): add custom events list (#11463) 2022-08-25 11:00:34 +00:00
install-macosx_arm64
migrate
migrate-check
plugin-server chore(plugin-server): do not use yarn to run prod plugin-server (#11434) 2022-08-23 14:03:13 +00:00
start feat: Add GeoIP2 capability to Django app (for feature flags) (#10890) 2022-07-25 17:20:11 -07:00
start-backend
start-frontend
start-frontend-https
start-https
start-worker
tests
upgrade-hobby fix: add persistent volumes to docker-compose-hobby (#11256) 2022-08-12 15:31:24 +01:00