diff --git a/kong/db/strategies/connector.lua b/kong/db/strategies/connector.lua index 719ef8078ca5..3f03cddc11f7 100644 --- a/kong/db/strategies/connector.lua +++ b/kong/db/strategies/connector.lua @@ -5,8 +5,8 @@ local fmt = string.format local Connector = { defaults = { pagination = { - page_size = 512, -- work with lmdb - max_page_size = 512, -- work with lmdb + page_size = 1000, + max_page_size = 50000, }, }, } diff --git a/kong/db/strategies/init.lua b/kong/db/strategies/init.lua index 90f7968a1ec7..99a5588d07d8 100644 --- a/kong/db/strategies/init.lua +++ b/kong/db/strategies/init.lua @@ -33,6 +33,12 @@ function _M.new(kong_config, database, schemas, errors) do local base_connector = require "kong.db.strategies.connector" + + -- lmdb will not support huge page size + if database == "off" then + base_connector.defaults.pagination.max_page_size = 2048 + end + local mt = getmetatable(connector) setmetatable(mt, { __index = function(t, k)