0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-25 11:17:50 +01:00

fix: Split healthcheck to separate nginx unit app (#20917)

Split healthcheck to separate nginx unit app

When posthog is under load the healthcheck can stop responding.
Split it off into a separate app so it has a dedicated thread to handle it
This commit is contained in:
Frank Hamand 2024-03-14 09:48:58 +00:00 committed by GitHub
parent 8b92cd1c62
commit 466c417e2b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -6,7 +6,7 @@
},
"listeners": {
"*:8000": {
"pass": "applications/posthog"
"pass": "routes/posthog"
},
"*:8001": {
"pass": "routes/metrics"
@ -16,6 +16,21 @@
}
},
"routes": {
"posthog": [
{
"match": {
"uri": ["/healthz"]
},
"action": {
"pass": "applications/posthog-health"
}
},
{
"action": {
"pass": "applications/posthog"
}
}
],
"metrics": [
{
"match": {
@ -38,6 +53,17 @@
]
},
"applications": {
"posthog-health": {
"type": "python 3.10",
"processes": 1,
"working_directory": "/code",
"path": ".",
"module": "posthog.wsgi",
"user": "nobody",
"limits": {
"requests": 5000
}
},
"posthog": {
"type": "python 3.10",
"processes": 4,