On Sep 27, 2009, at 9:39 PM, Fabio Mascarenhas wrote:
Hi Chad, Your script id doing everything correctly. This is extremely straightfoward code in LuaSQL, as you can see by looking at the source, and I doubt libmysqlclient, the library LuaSQL binds to, has a bug or leak on the triple mysql_init/mysql_real_connect/mysql_close.
i will mention here that somebody told me to build using "- lmysqlclient_r" instead of "-lmysqlclient", as -lmysqlclient has problems with memory leaks. does this sound accurate to you?
What operating system are you running on? If it is a Linux I guess it makes things easier, you could attach a leak detection tool such as valgrind to get more information.
i am using Linux, and i'm happy to do any kind of testing you feel would help the issue.
Are you reusing Lua states or lua_open'ing one for each connection? Make sure you are calling lua_close on your Lua states after you are done with them.
i don't fully understand your question. at what level are lua states opened and closed? as far as i know mod_lua is just an embedded version of plain 'ol lua, with a SWIG wrapper around it so FreeSWITCH can access it. isn't that stuff happening either at the Lua level or the LuaSQL level?
_______________________________________________ Kepler-Project mailing list [email protected] http://lists.luaforge.net/cgi-bin/mailman/listinfo/kepler-project http://www.keplerproject.org/
