Skip to content

Lua memory leak #3570

@michalholecek

Description

@michalholecek

Hi,
I am having a problem with lua scripts. When using envoy.lua http filter envoy allocates memory after each request, bot does not free it. In my case, after around 920K request, 1GB is allocated and envoy crashes.

This happens even when I just use the respond function:

function envoy_on_request(request_handle)
  request_handle:respond({[":status"] = "200"})
end

But it does not happen when I use print:

function envoy_on_request(request_handle)
  print("hello")
end

Since I am using a docker image, I dont have a stacktrace of this error, but here is full console output.
envoy_output.txt

I have also tried using "collectgarbage()" function but it doesn't help, just slows down whole envoy.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions