luasql icon indicating copy to clipboard operation
luasql copied to clipboard

Out of Memory

Open kirubz opened this issue 10 years ago • 7 comments

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.

kirubz avatar Oct 21 '14 18:10 kirubz

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

tomasguisasola avatar Oct 22 '14 12:10 tomasguisasola

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:

  1. Apache 2.2,
  2. MySQL,
  3. Lua5.1 Regards, Kirubaharan Palani

kirubz avatar Oct 25 '14 08:10 kirubz

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:

  1. Apache 2.2,
  2. MySQL,
  3. Lua5.1 Regards, Kirubaharan Palani

Reply to this email directly or view it on GitHub: https://github.com/keplerproject/luasql/issues/22#issuecomment-60476046

tomasguisasola avatar Oct 26 '14 13:10 tomasguisasola

Thanks Tomás, I will check and let you know how its performs. Once again thanks a lot.

kirubz avatar Oct 26 '14 15:10 kirubz

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!

DrAndyArmstrong avatar Oct 27 '14 14:10 DrAndyArmstrong

hi Kirubz, i have the same issue. Do you find out what's the problem finally?

jianren8023 avatar May 05 '15 07:05 jianren8023

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

tomatolog avatar Jan 11 '17 11:01 tomatolog