Re: [sqlalchemy] python: sqlalchemy - how do I ensure connection not stale using new event system

2013-04-03 Thread algotr8der
I think you nailed it. This is the problem. I will follow the approach you indicated. Thank you Michael. I appreciate it. On Tuesday, April 2, 2013 1:35:07 PM UTC-7, Michael Bayer wrote: if you're doing a query that is causing the database connection to simply fail, then you'd need to

Re: [sqlalchemy] python: sqlalchemy - how do I ensure connection not stale using new event system

2013-04-02 Thread Michael Bayer
if you're doing a query that is causing the database connection to simply fail, then you'd need to address that issue primarily. you'd probably want to perform multiple insert statements, chunking about 5-10K records at at time. On Apr 2, 2013, at 1:26 PM, algotr8...@gmail.com wrote: To

Re: [sqlalchemy] python: sqlalchemy - how do I ensure connection not stale using new event system

2013-04-01 Thread Michael Bayer
what is the actual reason that MySQL is disconnecting, is it actually being restarted while the operation proceeds ? running a long query shouldn't cause the connection to die off unless something goes wrong with the operation. On Apr 1, 2013, at 10:04 PM, algotr8...@gmail.com wrote: I

Re: [sqlalchemy] python: sqlalchemy - how do I ensure connection not stale using new event system

2013-04-01 Thread algotr8der
Thank you Michael for your response. So its not a long query that I think is the problem here because I don't believe the execution gets that far. My suspicion is that it is the line that computes the dictionary key/value pairs, which takes a long time since it has to build 677,161 x 10