local require = require
--- Set memory limit if supported
-if _G.set_memory_limit then
- set_memory_limit(1024 * 1024 * 1.5)
-end
-
-- Make sure that bitlib is loaded
if not _G.bit then
_G.bit = require "bit"
local ipairs, pairs = ipairs, pairs
local tostring, tonumber = tostring, tonumber
local pcall, assert, type = pcall, assert, type
+local set_memory_limit = set_memory_limit
local os = require "os"
local nixio = require "nixio"
local close = false
local stat, code, msg, message, err
+ env.config.memlimit = tonumber(env.config.memlimit)
+ if env.config.memlimit and set_memory_limit then
+ set_memory_limit(env.config.memlimit)
+ end
+
client:setsockopt("socket", "rcvtimeo", 5)
client:setsockopt("socket", "sndtimeo", 5)
config lucid main
option pollinterval 15000
- option threadlimit 2
+ option threadlimit 10
option daemonize 1
option debug 0
list supports tcpserver
list publisher webroot
list publisher luciweb
option nokeepalive 1
+ option memlimit 1572864
option enabled 1
config daemon https
list publisher webroot
list publisher luciweb
option nokeepalive 1
+ option memlimit 1572864
option enabled 1
option tls maincert
option encryption enable