You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by mh...@apache.org on 2018/08/04 21:42:30 UTC
[incubator-openwhisk-apigateway] branch redis-perf created (now
25ceb61)
This is an automated email from the ASF dual-hosted git repository.
mhamann pushed a change to branch redis-perf
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-apigateway.git.
at 25ceb61 Perf: Remove keepalive thresholds
This branch includes the following new commits:
new 25ceb61 Perf: Remove keepalive thresholds
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[incubator-openwhisk-apigateway] 01/01: Perf: Remove keepalive
thresholds
Posted by mh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
mhamann pushed a commit to branch redis-perf
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-apigateway.git
commit 25ceb61886f12eb609255ceec034988e7cf179e2
Author: Matt Hamann <mh...@us.ibm.com>
AuthorDate: Sat Aug 4 17:42:22 2018 -0400
Perf: Remove keepalive thresholds
---
scripts/lua/lib/redis.lua | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/scripts/lua/lib/redis.lua b/scripts/lua/lib/redis.lua
index b847917..1828b83 100644
--- a/scripts/lua/lib/redis.lua
+++ b/scripts/lua/lib/redis.lua
@@ -22,6 +22,7 @@ local cjson = require "cjson"
local utils = require "lib/utils"
local logger = require "lib/logger"
local request = require "lib/request"
+local redis = require "resty.redis"
local lrucache
local CACHE_SIZE
local CACHE_TTL
@@ -62,7 +63,6 @@ function _M.init()
local host = REDIS_HOST
local password = REDIS_PASS
local port = REDIS_PORT
- local redis = require "resty.redis"
local red = redis:new()
red:set_timeout(REDIS_TIMEOUT)
-- Connect to Redis server
@@ -94,8 +94,8 @@ end
--- Add current redis connection in the ngx_lua cosocket connection pool
-- @param red Redis client instance
function _M.close(red)
- -- put it into the connection pool of size 100, with 10 seconds max idle time
- local ok, err = red:set_keepalive(10000, 100)
+ -- release connection into the pool
+ local ok, err = red:set_keepalive()
if not ok then
request.err(500, utils.concatStrings({"Failed to set keepalive: ", err}))
end