249c5195ef
- Some API calls require very long query strings and thus overrun the iuWSGI default 4k buffer sizes. Expand the buffer to handle these larger requests. Change-Id: If61a6b4370452094cbbc2e5f5a88254d0a21c00b
30 lines
715 B
Bash
Executable File
30 lines
715 B
Bash
Executable File
#!/bin/bash
|
|
set -ex
|
|
|
|
PORT=${PORT:-9000}
|
|
UWSGI_TIMEOUT=${UWSGI_TIMEOUT:-300}
|
|
|
|
PROMENADE_THREADS=${PROMENADE_THREADS:-1}
|
|
PROMENADE_WORKERS=${PROMENADE_WORKERS:-4}
|
|
|
|
if [ "$1" = 'server' ]; then
|
|
exec uwsgi \
|
|
--http ":${PORT}" \
|
|
--http-timeout "${UWSGI_TIMEOUT}" \
|
|
--harakiri "${UWSGI_TIMEOUT}" \
|
|
--socket-timeout "${UWSGI_TIMEOUT}" \
|
|
--harakiri-verbose \
|
|
-b 32768 \
|
|
--lazy-apps \
|
|
--master \
|
|
--thunder-lock \
|
|
--die-on-term \
|
|
-z "${UWSGI_TIMEOUT}" \
|
|
--paste config:/etc/promenade/api-paste.ini \
|
|
--enable-threads \
|
|
--threads "${PROMENADE_THREADS}" \
|
|
--workers "${PROMENADE_WORKERS}"
|
|
fi
|
|
|
|
exec ${@}
|