SQLAlchemy Connection Pool setting

Hi everyone,

We are currently working on optimizing Indico’s performance, as we expect around 5,000 users to register for an event within a 4-hour window. To handle this, we need to ensure that Indico can efficiently manage up to 300 concurrent users.

Could you please advise on the appropriate SQLAlchemy connection pool settings to achieve this?

Specifically, I would appreciate guidance on the following parameters:

  • SQLALCHEMY_POOL_SIZE
  • SQLALCHEMY_POOL_RECYCLE
  • SQLALCHEMY_POOL_TIMEOUT

Your expertise and suggestions on fine-tuning these settings for optimal performance will be greatly appreciated.

Hi everyone,
I’d really appreciate any insights or advice you can share regarding the Indico SQLAlchemy connection pool settings.

Thank you in advance for your help!

Hi @ThiefMaster @pferreir
Did you know if anyone changed the default configuration for SQLAlchemy connection pool settings?

Without threads the default is fine (you never need/want more than 1 connection per uWSGI process). With threads (I think that was you?) you should set the pool size to something that resembles the amount of parallel requests you expect each uWSGI process to handle.

Of course also make sure your connection limit in the postgres config is high enough (SQLALCHEMY_POOL_SIZE x number of uWSGI worker processes).

1 Like

Thank you for your reply and clear clarification. Your response has been very helpful, and I appreciate your assistance