luasql
luasql copied to clipboard
Out of Memory
I am receiving Out of Memory issue while executing queries using LuaSQL. Can any one please help me on this. I have closed the connection properly, but still i am receiving this error.
Hi Kirubaharan
Could you provide us an example? What driver are you using?
Regards,
Tomás
On Tue, 21 Oct 2014, Kirubaharan Palani wrote:
I am receiving Out of Memory issue while executing queries using LuaSQL. Can any one please help me on this. I have closed the connection properly, but still i am receiving this error.
Reply to this email directly or view it on GitHub: https://github.com/keplerproject/luasql/issues/22
Hi Tomas, Sorry for the delay, Actually I used "luasql.mysql" to connect the database. Its working well, if I continuously access and insert data into database its producing "LuaSQL: error connecting: Out of memory" error and also Its not producing daily, in some scenarios only its producing.
Main Scenario: I have hosted multiple application in single server. Server Information:
- Apache 2.2,
- MySQL,
- Lua5.1 Regards, Kirubaharan Palani
Hi Kirubaharan
Since the problem occurs when you "continuously access and
insert data", it seems to that maybe you are not closing your cursors. Some systems are quite sensible to that situation. Can you check that?
Regards,
Tomás
On Sat, 25 Oct 2014, Kirubaharan Palani wrote:
Hi Tomas, Sorry for the delay, Actually I used "luasql.mysql" to connect the database. Its working well, if I continuously access and insert data into database its producing "LuaSQL: error connecting: Out of memory" error and also Its not producing daily, in some scenarios only its producing.
Main Scenario: I have hosted multiple application in single server. Server Information:
- Apache 2.2,
- MySQL,
- Lua5.1 Regards, Kirubaharan Palani
Reply to this email directly or view it on GitHub: https://github.com/keplerproject/luasql/issues/22#issuecomment-60476046
Thanks Tomás, I will check and let you know how its performs. Once again thanks a lot.
Kirubz,
Sounds potentially like a socket/file handle leak if they are not closed. I have made the same mistake of thinking closing the connection would bring down the cursors, but that was a silly assumption.
All fd should be closed really, but I think open connections reveal themselves quite quickly as mySQL will show them as inactive connections, but the cursor leak would be hard to spot!
hi Kirubz, i have the same issue. Do you find out what's the problem finally?
here is a script that you might issue as lua con1.lua 1025
and see that iterations up to 1024 passed well then got error reply LuaSQL: error connecting: Out of memory
and that issue is fixed after apply patch from #69