On Wednesday, April 10, 2019 at 9:23:02 AM UTC-4, tonthon wrote: > > Our services are served through apache and mod_wsgi (1 process, 10 > threads). > > ... >
> I can't reproduce this problem that seems to happen randomly. > > Considering this is multi-process/thread system - does any of your Pyramid code connect to the database during application setup? This type of error typically happens in that situation. If that is the case, you need to call `engine.dispose()` after the mod_wsgi process/thread fork. Unfortunately, I don't know how to catch that in mod_wsgi. -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at https://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.