On Wed, Apr 10, 2019 at 1:06 PM Jonathan Vanasco <jvana...@gmail.com> wrote:
>
>
>
> 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.


op, you're right, that is a thing.    Not sure if mod_wsgi makes it
easy to make that mistake though, that is, I thought all the Python
happens after the fork.   Well, if they are using daemon mode which
you definitely should always be using.

>
> --
> 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.

-- 
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.

Reply via email to