Description
Issue
High memory consumption in examples/http-server.lua with keep-alive connections
Steps to reproduce
- Run
luvit http-server.lua
- Run
ab -k -c 100 -t 20 http://127.0.0.1:8080/
- Look at memory usage.
Result: Memory is growing (I got 300MiB)
Additional info
With ab -c 100 -t 20 http://127.0.0.1:8080/
all is fine. But reverse proxy usually use keep-alive connections. So this solution isn't suitable for any non-local projects
Environment
luvit -v
luvit version: 2.18.1
luvi version: v2.14.0
libuv version: 1.44.2
ssl version: OpenSSL 1.1.1m 14 Dec 2021, lua-openssl 0.8.2
rex version: 8.37 2015-04-28
luajit -v
LuaJIT 2.1.1720049189 -- Copyright (C) 2005-2023 Mike Pall. https://luajit.org/
inxi -vv
CPU: 6-core AMD Ryzen 5 5625U with Radeon Graphics (-MT MCP-)
speed/min/max: 1982/400/4388 MHz Kernel: 6.9.9-1-MANJARO x86_64 Up: 8d 15h 20m
Mem: 9.53/15.01 GiB (63.5%) Storage: 476.94 GiB (76.6% used) Procs: 670
Shell: Zsh inxi: 3.3.35