fix: enhance database session initialization with configurable pool p…#277
fix: enhance database session initialization with configurable pool p…#277gdm-allo wants to merge 1 commit intoeneo-ai:developfrom
Conversation
|
Thank you for your contribution and for picking this up! Before we go deeper on the implementation, I'd like to understand the motivation: what problem are you trying to solve by making these configurable? Are you hitting a specific issue, or did you notice the env vars in the template weren't wired and assumed that was a bug? The pool settings were defined in config and documented in the env template but intentionally never wired to the engine. The reason is that changing pool size has significant operational implications, particularly for the worker. Non-crawl jobs (SharePoint sync, app runs, uploads, audit exports) hold a DB session for their entire duration, and the pool is shared across web (3 Gunicorn workers by default) and the ARQ worker. Setting the pool too low without adjusting Depending on the answer, there are two directions here: If there's a real need for configurability, this PR needs a few additions: startup validation that warns when If there's no specific use case, the cleaner path might be to remove the unused config from A couple of smaller things regardless: the Could you also create a GitHub issue and link it to this PR? |
Make database pool settings configurable instead of hardcoded values.