From 7ba12e9c5eafd809237fa69464e8b601926e9513 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Fri, 10 Jul 2009 16:39:30 +0000 Subject: Move memory limit to lucid, reincrease thread limit --- libs/lucid-http/luasrc/lucid/http/server.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libs/lucid-http/luasrc/lucid') diff --git a/libs/lucid-http/luasrc/lucid/http/server.lua b/libs/lucid-http/luasrc/lucid/http/server.lua index 25f2535d99..4bbec31a13 100644 --- a/libs/lucid-http/luasrc/lucid/http/server.lua +++ b/libs/lucid-http/luasrc/lucid/http/server.lua @@ -14,6 +14,7 @@ $Id$ 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" @@ -408,6 +409,11 @@ function Server.process(self, client, env) 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) -- cgit v1.2.3