Skip to content

Commit

Permalink
fix(ngx_tpl.lua): add backlog for listen (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
wklken authored Oct 10, 2024
1 parent 6e06efe commit 3f20147
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/build/patches/007_ngx_tpl_add_backlog.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
diff --git a/apisix/cli/ngx_tpl.lua b/apisix/cli/ngx_tpl.lua
index 142d9229..9df0814a 100644
--- a/apisix/cli/ngx_tpl.lua
+++ b/apisix/cli/ngx_tpl.lua
@@ -603,11 +603,11 @@ http {

server {
{% for _, item in ipairs(node_listen) do %}
- listen {* item.ip *}:{* item.port *} default_server {% if item.enable_http2 then %} http2 {% end %} {% if enable_reuseport then %} reuseport {% end %};
+ listen {* item.ip *}:{* item.port *} default_server {% if item.enable_http2 then %} http2 {% end %} {% if enable_reuseport then %} reuseport {% end %} backlog=16384;
{% end %}
{% if ssl.enable then %}
{% for _, item in ipairs(ssl.listen) do %}
- listen {* item.ip *}:{* item.port *} ssl default_server {% if item.enable_http2 then %} http2 {% end %} {% if enable_reuseport then %} reuseport {% end %};
+ listen {* item.ip *}:{* item.port *} ssl default_server {% if item.enable_http2 then %} http2 {% end %} {% if enable_reuseport then %} reuseport {% end %} backlog=16384;
{% end %}
{% end %}
{% if proxy_protocol and proxy_protocol.listen_http_port then %}

0 comments on commit 3f20147

Please sign in to comment.