On Thu, Aug 15, 2019, at 1:09 PM, Abhishek Sharma wrote:
> Thanks Mike for your response.
> 
> It's more likely due to multi threading because this error is coming very 
> randomly, If this was due to permutations you mentioned then it should happen 
> every time which is not the case here.
> 
> Any recommendations for handling sessions in multithreading?

mostly it depends on the kind of application you are working with and what 
kinds of containment are present. For example, a web application has a certain 
set of practices, then an application that runs database logic in a Celery task 
queue has a set of practices, an application that runs as a cron job has a set 
of practices, etc.

The general idea is of course "share nothing" between threads but specifics 
matter, so, still need to know lots of specifics like all those things in order 
to have a useful answer.


> 
> -- 
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/sqlalchemy/f01cad62-c4cf-4674-b677-71f9702ddca6%40googlegroups.com.
> 

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sqlalchemy/6592c7b3-864c-4bc7-a6cf-13a139810e33%40www.fastmail.com.

Reply via email to