openresty / openresty/lua-nginx-module
lua: failed to run factory at key "..." not enough memory
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 11.8k
- Forks
- 2.1k
- Avg merge
- 6h 1m
- Merged PRs (30d)
- 6
Description
Hello,
I began receiving following error message:
2016/12/06 08:21:56 [error] 9980#0: *11123 lua: failed to run factory at key "nhli_cf54fbc89f2ef098d59affbc54df81ec": not enough memory while reading response header from upstream
On the client-side I receive "The page isn't working" and empty response.
Found this: https://github.com/openresty/lua-nginx-module/issues/494
and I do manipulate long Lua string - entire page's html.
But I do not see any other signs of memory leak, except for this message. The machine is responsive, with RAM usage at around 33%, CPU not higher than 2%. It is currently used for testing, so only me and one other person uses it.
The machine I run the lua-nginx on sits on Rackspace, Debian, installed as nginx-extras.
Restarting nginx helped get over the error, but I have two more machines in production. I'd like to avoid getting the error there.
What can be other causes to see this message?
How can I protect my Lua code from leaking memory?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No repository file or failing test is named. Start with the reported long Lua string path in lua-nginx-module and compare the symptoms with linked issue #494; reproduce the nginx error on Debian and identify a confirmed cause and a way to prevent the memory failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- debian, lua, nginx
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100