On Wed, Jun 13, 2012 at 10:06 AM, Paul McNett <[email protected]> wrote: > On 6/13/12 4:43 AM, Nathan Lowrie wrote: >> I wanted to use the KeepAliveInterval property to prevent a MySQL >> connection from going away. When I set the property in the dConnectInfo >> object (I am dynamically creating connections), the result is a 30 second >> load time compared to 2 seconds without the property. It also makes the >> entire app unusable and slows down anything with bizobj access. I tried >> increasing the time on the sleep call in the worker thread but it didn't >> help. >> >> Any thoughts? > > Line 603 of dabo/dabo/db/dBackend.py looks like the likely problem: the > thread is > basically running in a tight loop (once every 1/10 of a second). Pretty sure > that was > just a typo. Try increasing that to something like 300. > > That whole worker thread should be rewritten to sleep for the > KeepAliveInterval IMO. > Looks like I wrote this in Jan. 2009 and I don't ever remember actually using > it, > although I've been meaning to get some sort of keep alive working in my app. > In my > defense I was still heavy in the fog of chemotherapy when I wrote that. > > Anyway, play around with that sleep interval and if it improves things, > please commit > your changes.
I'll rewrite it to use the keepAliveInterval as the sleep duration and to move the object creation out of the while loop. I had changed the interval to 1 but it didn't do anything noticeable. Regards, Nate _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/CAGcHxzbcVN5D8X+AQCwsZ1a0ZYjoMf8XZO=peuqyzts50gx...@mail.gmail.com
