Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CLI: increase body size on template render.
Browse files Browse the repository at this point in the history
A user reported that when a lot of services in K8s environment started
with apicast name, APICast cannot started because of the body size of
the template.

Because the body limit is set to nil, but liquid template set to 100000
[0] and started to fail in there.

The main reason to print all ENV variables on the nginx.conf, is because
the following code [1]

[0] https://github.com/3scale/liquid-lua/blob/a7f4119e96054f08df1fb8dce2be3469eb7ffb5f/lib/liquid.lua#L2675-L2686
[1] https://github.com/3scale/APIcast/blob/fba67b02200a4df231546145296927dea816c33f/gateway/http.d/init.conf#L46-L58

Fix THREESCALE-6315

Signed-off-by: Eloy Coto <[email protected]>
eloycoto committed Nov 11, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent fba67b0 commit e9d9efb
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion gateway/src/apicast/cli/command/start.lua
Original file line number Diff line number Diff line change
@@ -167,7 +167,6 @@ function mt:__call(options)
update_env(env)
-- also use env from the config file
update_env(context.env or {})

local nginx = nginx_config(context, template_path)

local log_level = get_log_level(self, options)
2 changes: 1 addition & 1 deletion gateway/src/apicast/cli/template.lua
Original file line number Diff line number Diff line change
@@ -94,7 +94,7 @@ function _M:interpret(str)
local context = self.context
local filesystem = self.filesystem
local filter_set = FilterSet:new()
local resource_limit = ResourceLimit:new(nil, 1000, nil)
local resource_limit = ResourceLimit:new(1000000, 1000, nil)

local filesystem_cache = {}

0 comments on commit e9d9efb

Please sign in to comment.