0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-28 18:26:15 +01:00
Commit Graph

22 Commits

Author SHA1 Message Date
Julian Bez
84a098ce64
feat(celery): Add prefetch multiplier to flags (#21399)
Since the env var doesn't make it to the subprocess
2024-04-08 12:22:06 +00:00
Frank Hamand
7148e2c884
feat: Allow setting --max-tasks-per-child on celery worker (#21163)
Allow setting --max-tasks-per-child on celery worker

This is so we can try to stop worker memory usage growing over time
2024-03-26 16:34:20 +00:00
Julian Bez
6f0233608e
fix: Fix starting local celery worker queues (#19837) 2024-01-18 17:25:43 +00:00
James Greenhill
6b50aff12b
chore: enable gossip for flower and to squelch errors (#19823) 2024-01-18 08:01:02 +00:00
Julian Bez
95fec19aaf
feat(celery): Prepare to run on multiple queues (#19157)
* Add Celery queues env file with default queues

Reasoning:
We need to configure Celery workers in several places to consume
from a specific set of queues.

* Define some queues
2024-01-17 11:54:12 +00:00
Harry Waye
40616f0d7c
chore(dev): clean up background jobs on EXIT and prop. exit code (#10916)
We were for instance calling trap at a point where it wouldn't get
called, and giving special status to some processes to run in the
foreground.

Instead we:

 1. wait for any process exit
 2. use it's exit code for the calling process
 3. kill background processes on EXIT
2022-07-21 13:32:38 +00:00
Tiina Turban
0fb19f87d7
Check for all necessary migrations completed before worker, plugins start (#8504) 2022-02-17 17:56:24 +01:00
Yakko Majuri
909d6bf7c6
do not start worker, plugins, or events if migrations not complete (#7823) 2022-01-06 10:30:47 -03:00
Yakko Majuri
782f7e7ef0
add SKIP_ASYNC_MIGRATIONS_SETUP=0 to celery startup (#7736) 2021-12-15 14:57:19 -03:00
Yakko Majuri
92c28d0160
Revert "Revert "Add names to celery nodes (#7054 pt. 2) (#7433)" (#74… (#7450)
* Revert "Revert "Add names to celery nodes (#7054 pt. 2) (#7433)" (#7449)"

This reverts commit ecf0679c98.

* Update bin/docker-worker-beat

* Update bin/docker-worker-celery

* Update bin/start-worker

* Update bin/docker-worker-beat

* Update bin/docker-worker-beat
2021-11-30 18:52:12 +00:00
Yakko Majuri
ecf0679c98
Revert "Add names to celery nodes (#7054 pt. 2) (#7433)" (#7449)
This reverts commit 444568a06e.
2021-11-30 15:21:05 -03:00
Yakko Majuri
444568a06e
Add names to celery nodes (#7054 pt. 2) (#7433)
* add names to celery nodes

* use python instead

* hostname naming
2021-11-30 17:06:19 +00:00
Karl-Aksel Puulmann
bbd41ef04a
Use -Ofair for celery workers (#5063)
From https://medium.com/@taylorhughes/three-quick-tips-from-two-years-with-celery-c05ff9d7f9eb

> By default, preforking Celery workers distribute tasks to their worker processes as soon as they are received, regardless of whether the process is currently busy with other tasks.
> If you have a set of tasks that take varying amounts of time to complete — either deliberately or due to unpredictable network conditions, etc. — this will cause unexpected delays in total execution time for tasks in the queue.

This is 100% the case for us. This should "load balance" the tasks
better across workers.
2021-07-12 13:52:05 +03:00
Paolo D'Amico
01b7daacc2
Remove NewRelic from Cloud (#4716)
* remove NR

* remove secret key too
2021-06-14 11:01:57 +02:00
Paolo D'Amico
2020c32c66
Add NewRelic to cloud deployment (#4005) 2021-04-15 11:53:19 -07:00
Marius Andra
c24aebe174
Add flags to bin/docker-worker-celery (#2621)
* add flags to docker-worker-celery and rename --with-beat to --with-scheduler

* Clean script up

Co-authored-by: Michael Matloka <dev@twixes.com>
2020-12-03 18:53:06 +01:00
Marius Andra
b8d1ba43f4
Disable celery heartbeat, gossip and mingle (#2513)
* disable celery heartbeat, gossip and mingle

* keep the heartbeat

* beat doesn't want these params

* add back "without heartbeat"
2020-11-26 12:44:10 +01:00
Marius Andra
88ad205a3a
Separate Plugins dyno for Heroku (#2213)
* separate plugin worker for heroku

* plugin server for dev with less concurrency

* add back plugins script

* move beat log to beat

* move starting the beat into the celery worker

* add optional process types for plugins and celery

* premium redis for heroku review apps

* fix broken script

* proc/dyno names are alphanumeric

* singularize

* premium-0 redis for all heroku apps, not just review apps

* premium-0 redis also for review apps

* remove heroku redis modifications

* remove out of scope code

* run beat in bg
2020-11-20 10:42:59 +01:00
Marius Andra
a5d9f98e00
Reduce Heroku worker thread count (#2092)
* update the concurrency for heroku workers

* update the concurrency for heroku workers (add link)
2020-10-30 10:17:55 +01:00
James Greenhill
7714a65108
Use celery defaults, bumping workers only increased latency of event processing (#1584) 2020-09-04 16:21:55 -07:00
James Greenhill
aa7de23aec
Increase number of concurrent celery workers in production (#1583) 2020-09-04 15:56:58 -07:00
Marius Andra
14f12846ed
Helm redis (#558)
* ignore copying frontend/dist folder - otherwise whatever you build in docker will get overridden by local build artifacts if any exist in frontend/dist

* support configuring redis with POSTHOG_REDIS_HOST and other vars in addition to REDIS_URL

* remove "the next version" in worker requirement modal

* split beat and celery scripts

* remove chart folder

* celery heartbeat every 10sec, reduce distributed beat lock hold time

* remove dockerfile local link

* add localhost redis url for tests
2020-04-13 16:22:06 +01:00