Charan S commited on
Commit ·
d453a61
1
Parent(s): 41ab656
Fix: disable statement cache for Supabase pooler compatibility
Browse filesFiles changed (2)
- database.py+2
- start.sh+9-5
13 unmodified lines14151617181913 unmodified linespool_size=20,max_overflow=10,pool_pre_ping=True,)13 unmodified lines141516171819202113 unmodified linespool_size=20,max_overflow=10,pool_pre_ping=True,# Required for Supabase/PgBouncer connection pooler compatibilityconnect_args={"statement_cache_size": 0},)
12345678910111213#!/bin/shset -e# Supabase / Neon provide postgres:// — SQLAlchemy asyncpg needs postgresql+asyncpg://if [ -n "$DATABASE_URL" ]; thenexport DATABASE_URL=$(echo "$DATABASE_URL" \| sed 's|^postgres://|postgresql+asyncpg://|' \| sed 's|^postgresql://|postgresql+asyncpg://|')fi# HuggingFace persistent volume — ChromaDB lives here across restartsmkdir -p /data/chroma_dbexport CHROMA_PERSIST_DIR=${CHROMA_PERSIST_DIR:-/data/chroma_db}1234567891011121314151617#!/bin/shset -e# Guard — fail fast with a clear message if DATABASE_URL is missingif [ -z "$DATABASE_URL" ]; thenecho "ERROR: DATABASE_URL is not set. Add it in HuggingFace Space Settings → Secrets."exit 1fi# Supabase / Neon provide postgres:// — SQLAlchemy asyncpg needs postgresql+asyncpg://export DATABASE_URL=$(echo "$DATABASE_URL" \| sed 's|^postgres://|postgresql+asyncpg://|' \| sed 's|^postgresql://|postgresql+asyncpg://|')# HuggingFace persistent volume — ChromaDB lives here across restartsmkdir -p /data/chroma_dbexport CHROMA_PERSIST_DIR=${CHROMA_PERSIST_DIR:-/data/chroma_db}
database.py+2
start.sh+9-5