diff --git a/start_flask.sh b/start_flask.sh old mode 100644 new mode 100755 index 5f7d2b4..d28c1df --- a/start_flask.sh +++ b/start_flask.sh @@ -38,4 +38,4 @@ if [ -z "$CELLXGENE_DATA" ] && [ -z "$CELLXGENE_BUCKET" ]; then exit 1 fi -cellxgene-gateway \ No newline at end of file +exec cellxgene-gateway \ No newline at end of file diff --git a/start_gunicorn.sh b/start_gunicorn.sh old mode 100644 new mode 100755 index 994b899..4e6da8f --- a/start_gunicorn.sh +++ b/start_gunicorn.sh @@ -76,7 +76,7 @@ cd "$SCRIPT_DIR" # Additional options you can add via environment variables: # - GUNICORN_MAX_REQUESTS: Restart worker after N requests (prevents memory leaks) # - GUNICORN_MAX_REQUESTS_JITTER: Add randomness to max-requests -gunicorn cellxgene_gateway.gateway:app \ +exec gunicorn cellxgene_gateway.gateway:app \ --workers "$WORKERS" \ --worker-class "$WORKER_CLASS" \ --bind "$BIND" \ diff --git a/start_uwsgi.sh b/start_uwsgi.sh old mode 100644 new mode 100755 index 54966f4..7cfaa58 --- a/start_uwsgi.sh +++ b/start_uwsgi.sh @@ -53,6 +53,7 @@ export GATEWAY_ENABLE_BACKED_MODE=${GATEWAY_ENABLE_BACKED_MODE:-true} # Check if uwsgi is installed if ! command -v uwsgi &> /dev/null; then echo "Error: uwsgi not found. Install with: pip install uwsgi" + exit 1 else # Display configuration echo "Starting Cellxgene Gateway with uWSGI..." @@ -70,7 +71,7 @@ else # Start uWSGI with optimized settings # Additional options you can add via environment variables: # - UWSGI_MAX_REQUESTS: Restart worker after N requests (prevents memory leaks) - uwsgi \ + exec uwsgi \ --http "$HOST:$PORT" \ --module cellxgene_gateway.gateway:app \ --workers "$WORKERS" \