Skip to content

Commit b13bb21

Browse files
authored
fix: set cowboy active_n=100 as cowboy 2.12.0 (#1530)
cowboy 2.13.0 set the default active_n=1
1 parent 6cfe6e1 commit b13bb21

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

lib/realtime_web/endpoint.ex

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ defmodule RealtimeWeb.Endpoint do
1616
connect_info: [:peer_data, :uri, :x_headers],
1717
fullsweep_after: 20,
1818
max_frame_size: 8_000_000,
19+
# https://github.com/ninenines/cowboy/blob/24d32de931a0c985ff7939077463fc8be939f0e9/doc/src/manual/cowboy_websocket.asciidoc#L228
20+
# active_n: The number of packets Cowboy will request from the socket at once.
21+
# This can be used to tweak the performance of the server. Higher values reduce
22+
# the number of times Cowboy need to request more packets from the port driver at
23+
# the expense of potentially higher memory being used.
24+
active_n: 100,
1925
serializer: [
2026
{Phoenix.Socket.V1.JSONSerializer, "~> 1.0.0"},
2127
{Phoenix.Socket.V2.JSONSerializer, "~> 2.0.0"}

mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ defmodule Realtime.MixProject do
44
def project do
55
[
66
app: :realtime,
7-
version: "2.47.2",
7+
version: "2.47.3",
88
elixir: "~> 1.17.3",
99
elixirc_paths: elixirc_paths(Mix.env()),
1010
start_permanent: Mix.env() == :prod,

0 commit comments

Comments
 (0)