lunarmodules / luasql

LuaSQL is a simple interface from Lua to a DBMS.
http://lunarmodules.github.io/luasql
535 stars 192 forks source link

Error connection: Out of memory #105

Open WhiteyDude opened 5 years ago

WhiteyDude commented 5 years ago

Hi all,

We're running luasql 2.3.0 under lua 5.1.4, which is called by asterisk (open source PBX) as a dial plan interpreter.

This has worked perfectly for us for years. We've recently built a new machine to move load to, with the same MariaDB libraries, luasql version and lua version. However we're seeing nightly between 2am-6am the following error:

LuaSQL: error connecting: Out of memory.

A little digging shows that this is thrown in LuaSQL when the MySQL library itself responds with NULL to the connect event.

Can you please recommend methods of troubleshooting this? I'm unsure how to monitor the memory allocation being used by LuaSQL, or of how to get any further verbosity from this.

I've backpatched https://github.com/keplerproject/luasql/commit/fea0c00090f65c271748f3c7cc00b51b36fd37b8 into the 2.3.0 and rebuilt the library - due to suspecting the close was not working - however this has not assisted at all.

Thanks!