mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-21 21:49:51 +01:00
eda2cd5ce7
Revert "chore: Allow instrumentation of gunicorn with statsd (#11372)"
This reverts commit 84ea166e9b
.
24 lines
611 B
Bash
Executable File
24 lines
611 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
./bin/migrate-check
|
|
|
|
# To ensure we are able to expose metrics from multiple processes, we need to
|
|
# provide a directory for `prometheus_client` to store a shared registry.
|
|
export PROMETHEUS_MULTIPROC_DIR=$(mktemp -d)
|
|
trap 'rm -rf "$PROMETHEUS_MULTIPROC_DIR"' EXIT
|
|
|
|
export PROMETHEUS_METRICS_EXPORT_PORT=8001
|
|
|
|
gunicorn posthog.wsgi \
|
|
--config gunicorn.config.py \
|
|
--bind 0.0.0.0:8000 \
|
|
--log-file - \
|
|
--log-level info \
|
|
--access-logfile - \
|
|
--worker-tmp-dir /dev/shm \
|
|
--workers=2 \
|
|
--threads=4 \
|
|
--worker-class=gthread \
|
|
--limit-request-line=8190 $@
|