zalsaeed / cgav

Certificate Generation and Verification
GNU General Public License v3.0
4 stars 2 forks source link

TimeoutError Database #10

Closed SalmanSaleh1 closed 9 months ago

SalmanSaleh1 commented 10 months ago

sqlalchemy.exc.TimeoutError: QueuePool limit of size 10 overflow 10 reached, connection timed out, timeout 30.00 image

After approximately 10 minutes of system usage, a timeout error occurs, causing the system to halt abruptly. Consequently, users are unable to complete their tasks.

SalmanSaleh1 commented 9 months ago

This adjustment helps prevent TimeoutError issues in application and improves database connection management:


app.config['SQLALCHEMY_POOL_SIZE'] = 100 # you allow up to 100 concurrent connections to the database.
app.config['SQLALCHEMY_POOL_RECYCLE'] = 3600 # 3600 seconds (1 hour) means that connections will be recycled after being open for 1 hour.