> Did you actually see increasing memory consumption in LuaSQL due to
> this, or is it just a problem with the valgrind report?
it's widely known in the FreeSWITCH community that the LuaSQL MySQL driver is 
unusable because of this very problem.  i've seen it personally on my running 
FreeSWITCH instances, and it's not pretty...  ;)  since Lua is the recommended 
scripting language for FreeSWITCH, it's a real drag that people can't leverage 
the MySQL driver to do database-backed stuff.  the workaround for us at this 
time is 'use the ODBC driver'.
> The
> documentation seems to imply that this function would need to be
> called only when there are no more outstanding connections in the
> whole process; coordinating a shutdown of the MySQL client among
> different Lua states that can be running is doable but definitely
> non-trivial (meaning it is not a quick fix), so I would like to get a
> better grasp on the severity of this.
i'm pretty sure the reason this appears so badly with FreeSWITCH is because the 
FreeSWITCH master process uses a new instance of Lua any time it gets a call to 
run a Lua script.  since the master FreeSWITCH process runs continuously, the 
memory leak builds up.  i'm guessing for most use cases, the Lua script 
leveraging LuaSQL is called directly and then the process terminates, so the 
leak never builds up.
FreeSWITCH should be able to use LuaSQL the way it does without issues, i 
believe.  in fact, it can process thousands of calls to regular Lua scripts 
without any issues whatsoever.
_______________________________________________
Kepler-Project mailing list
Kepler-Project@lists.luaforge.net
http://lists.luaforge.net/cgi-bin/mailman/listinfo/kepler-project
http://www.keplerproject.org/

Reply via email to