Skip to content

Commit

Permalink
fix(timer-ng): decrease the minimum/maximum threads
Browse files Browse the repository at this point in the history
Too high concurrency setting might make Kong throws error at the runtime.

(cherry picked from commit 3192675)
  • Loading branch information
ADD-SP authored and github-actions[bot] committed Feb 22, 2024
1 parent 3a8fb78 commit c9baeb3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
message: |
Fix a bug where the ulimit setting (open files) is low Kong will fail to start as the lua-resty-timer-ng exhausts the available worker_connections. Decrease the concurrency range of the lua-resty-timer-ng library from [512, 2048] to [256, 1024] to fix this bug.
type: bugfix
4 changes: 2 additions & 2 deletions kong/globalpatches.lua
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ return function(options)

else
_timerng = require("resty.timerng").new({
min_threads = 512,
max_threads = 2048,
min_threads = 256,
max_threads = 1024,
})
end

Expand Down

0 comments on commit c9baeb3

Please sign in to comment.