diff --git a/plugins/webstats/conf/webstats.conf b/plugins/webstats/conf/webstats.conf index ac03647ee..6e4c6e0d9 100644 --- a/plugins/webstats/conf/webstats.conf +++ b/plugins/webstats/conf/webstats.conf @@ -1,2 +1,2 @@ -lua_shared_dict mw_total 50m; +lua_shared_dict mw_total 100m; include {$SERVER_APP}/lua/webstats_log.lua; \ No newline at end of file diff --git a/plugins/webstats/lua/webstats_common.lua b/plugins/webstats/lua/webstats_common.lua index e79229956..0fe7d8344 100644 --- a/plugins/webstats/lua/webstats_common.lua +++ b/plugins/webstats/lua/webstats_common.lua @@ -17,7 +17,7 @@ local cache = ngx.shared.mw_total local today = ngx.re.gsub(ngx.today(),'-','') local request_header = ngx.req.get_headers() -local method = ngx.req.get_headers() +local method = ngx.req.get_method() local day = os.date("%d") local number_day = tonumber(day) @@ -443,8 +443,8 @@ function _M.cron(self) self:unlock_working(cron_key) - ngx.update_time() - self:D("--【"..tostring(llen).."】, elapsed: " .. tostring(ngx.now() - begin)) + -- ngx.update_time() + -- self:D("--【"..tostring(llen).."】, elapsed: " .. tostring(ngx.now() - begin)) end ngx.timer.every(0.5, timer_every_get_data)