Re: [sqlalchemy] Session problems

2010-10-07 Thread Michael Bayer
On Oct 7, 2010, at 12:53 AM, Warwick Prince wrote: Hi Michael I'm still having a couple of issues with the sessions, but I'm now starting to suspect mysqlconnector.. For completeness, could you please let me know if there is anything specific I need to do to close down a session /

[sqlalchemy] Session problems

2010-10-06 Thread Warwick Prince
Dear All I'm having a very strange issue with Sessions that I'm hoping someone can guide me on; I have a situation where a large body of code spawns new processes (multiprocessing.process). The core design manages 3 (possible) database connections, and I've used a unique session for each. The

Re: [sqlalchemy] Session problems

2010-10-06 Thread Chris Withers
On 06/10/2010 10:46, Warwick Prince wrote: (InterfaceError) 2055: Lost connection to MySQL server at '192.168.50.2:3306 http://192.168.50.2:3306', system error: 10054 u'SELECT products.. ...it would be interesting to see the rest of that error message... Chris -- You received this

[sqlalchemy] Session problems

2010-10-06 Thread Warwick Prince
Hi All More details on the session issue; Please note, the test I just did was this; Restart the mySQL server. Start Process #1 and create a session and use it (works fine) Start Process #2 (Identical code to #1, just another instance). Go back to #1 and attempt to do another query and I get

Re: [sqlalchemy] Session problems

2010-10-06 Thread Michael Bayer
On Oct 6, 2010, at 5:46 AM, Warwick Prince wrote: Dear All I'm having a very strange issue with Sessions that I'm hoping someone can guide me on; I have a situation where a large body of code spawns new processes (multiprocessing.process). The core design manages 3 (possible)

Re: [sqlalchemy] Session problems

2010-10-06 Thread Michael Bayer
On Oct 6, 2010, at 6:46 AM, Warwick Prince wrote: I can't quite get my head around the scope of sessionmaker() yet.. I've tried putting Session = sessionmaker() as a global to the entire codebase (works but has same problem) do you mean scoped_session here ? sessionmaker is just a

Re: [sqlalchemy] Session problems

2010-10-06 Thread Warwick Prince
Hi All Just incase anyone was wondering.. I found the cause of my session issues. (Hooray!) The Application is served by a home grown python HTTP server which works just fine - however, I found that it had an implementation of threading POOL to handle requests, rather than creating a new thread

[sqlalchemy] Session problems

2010-10-06 Thread Warwick Prince
Hi Michael I'm still having a couple of issues with the sessions, but I'm now starting to suspect mysqlconnector.. For completeness, could you please let me know if there is anything specific I need to do to close down a session / connection / engine etc if I want to completely release it.