Software /
code /
prosody
Comparison
plugins/mod_c2s.lua @ 11540:1937b3c3efb5 0.11
mod_c2s, mod_s2s, mod_component, mod_bosh, mod_websockets: Set default stanza size limits
c2s/bosh/ws streams will default to 256KB, s2s and components to 512KB.
These values are aligned with ejabberd's default settings, which should reduce
issues related to inconsistent size limits between servers on the XMPP network.
The previous default (10MB) is excessive for any production server, and allows
significant memory usage by even unauthenticated sessions.
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 07 May 2021 17:03:49 +0100 |
parent | 11511:cab64a0aad49 |
child | 11560:3bbb1af92514 |
child | 11746:68faaf936f6d |
comparison
equal
deleted
inserted
replaced
11539:3413fea9e6db | 11540:1937b3c3efb5 |
---|---|
24 local log = module._log; | 24 local log = module._log; |
25 | 25 |
26 local c2s_timeout = module:get_option_number("c2s_timeout", 300); | 26 local c2s_timeout = module:get_option_number("c2s_timeout", 300); |
27 local stream_close_timeout = module:get_option_number("c2s_close_timeout", 5); | 27 local stream_close_timeout = module:get_option_number("c2s_close_timeout", 5); |
28 local opt_keepalives = module:get_option_boolean("c2s_tcp_keepalives", module:get_option_boolean("tcp_keepalives", true)); | 28 local opt_keepalives = module:get_option_boolean("c2s_tcp_keepalives", module:get_option_boolean("tcp_keepalives", true)); |
29 local stanza_size_limit = module:get_option_number("c2s_stanza_size_limit"); -- TODO come up with a sensible default (util.xmppstream defaults to 10M) | 29 local stanza_size_limit = module:get_option_number("c2s_stanza_size_limit", 1024*256); |
30 | 30 |
31 local measure_connections = module:measure("connections", "amount"); | 31 local measure_connections = module:measure("connections", "amount"); |
32 local measure_ipv6 = module:measure("ipv6", "amount"); | 32 local measure_ipv6 = module:measure("ipv6", "amount"); |
33 | 33 |
34 local sessions = module:shared("sessions"); | 34 local sessions = module:shared("sessions"); |