I have several endpoints that import a SQLAlchemy Sessionmaker I've created, which is included in a global package, create a session, interact with my database, and then close the session. Each time I hit the endpoint, a new process is created (when I enter "show processlist;" in MYSQL) with a "command" of "sleep" and "NULL" info. Therefore, I quickly hit max_user_connections. I've read a lot about SQLAlchemy connection pooling, and tried several different solutions to no avail. I tried setting "pool_recycle=280", "poolclass=NullPool", as well as setting "pre_ping=True". Regardless of the settings I've tried so far, the functionality has seemed to be the same, with processes being created and seemingly being recycled after ~5 minutes.
What am I missing?