I am facing a rather strange GC related bug with LuaSQL. I have a host app which calls a function in lua every second and the simplified script looks some thing like this.
-- local env = assert (luasql.odbc()) local con = assert (env:connect(connectionstring)) function onesecondtimer () local cur = assert (con:execute (query)) local row = cur:fetch ({}, "a") while row do -- do something and fetch next end end -- This apps is running almost 24 hours a day, but every once a while ( like every 2 days or so ), luaSQL returns "there are open connections" error. digging through, it seems like env_close is being called ( without conn_close being called ) Okay, first of all, I am not really sure why env_close is being called ( i.e why is env object being GC'd ) I haven't been able to repro this under a debugger, so i am not really sure what's happening. Any pointer's on what might be happening ? or how i might debug this ? note: I don't have any explicit close statements for env,connection or the cursor. -Ankit. _______________________________________________ Kepler-Project mailing list Kepler-Project@lists.luaforge.net http://lists.luaforge.net/cgi-bin/mailman/listinfo/kepler-project http://www.keplerproject.org/