pallets-eco / flask-security

Quick and simple security for Flask applications
MIT License
1.63k stars 513 forks source link

QueuePool limit of size overflow when frequently login and out #871

Open yanqingjing opened 2 years ago

yanqingjing commented 2 years ago

I followed the document example of flask security with sqlAlchemy from: basic-sqlalchemy-application-with-session

When I was testing the login function, after frequent login and logout(more than 20 time in one minute), the application will crash down and raise exception:

sqlalchemy.exc.TimeoutError: QueuePool limit of size 10 overflow 10 reached, connection timed out, timeout 30 (Background on this error at: http://sqlalche.me/e/13/3o7r)