Welcome! Log In Create A New Profile

Advanced

lua handler aborted: memory allocation error: not enough memory

August 07, 2012 01:00PM
Hello,

Please help me to solve a problem. I use Lua to get a value from memcache and then jump into next nginx location and get these errors from time to time (ofen enaugh).

lua handler aborted: memory allocation error: not enough memory
(lua-atpanic) Lua VM crashed, reason: not enough memory

My Lua code is simple enaugh:
content_by_lua
'
local memcached = require "resty.memcached";
local memc = memcached:new();

memc:set_timeout(500);

local connection, err = memc:connect("...");
if not connection then
return ngx.exec("...");
else
local value, flags, err = memc:get(...);
local connection, err = memc:close()

if value
return ngx.exec("...");
else
return ngx.exec("...");
end
end
';

My server memory stats:
Mem: 70G Active, 7296M Inact, 11G Wired, 3736M Cache, 9828M Buf, 806M Free
Swap: 32G Total, 545M Used, 31G Free, 1% Inuse
Subject Author Posted

lua handler aborted: memory allocation error: not enough memory

Yahook August 07, 2012 01:00PM

Re: lua handler aborted: memory allocation error: not enough memory

Yahook August 08, 2012 10:04AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 294
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready