zlhgo edited a comment on issue #6184:
URL: https://github.com/apache/apisix/issues/6184#issuecomment-1053857163


   经过20天的线上验证,该问题目前没有再出现过。下面说下解决方法、思路和自查是否同样的问题。
   
   1、解决方法
   修改 `/usr/local/openresty/lualib/tablepool.lua` 文件,去掉内存复用相关的功能,每次申请新的内存。
   ```lua
   local newtab = require "table.new"
   
   
   local _M = newtab(0, 2)
   
   
   function _M.fetch(tag, narr, nrec)
       return newtab(narr, nrec)
   end
   
   
   function _M.release(tag, obj, noclear)
       -- nil
   end
   
   
   return _M
   
   -- vi: ft=lua ts=4 sw=4 et
   ```
   
   2、解决思路
   
其实也是蒙的。因为看了apisix的代码感觉也没什么问题,从`access.log`日志里看就是串站了,所以怀疑可能是api_ctx的内存串了,但是我也不敢确定是这个问题。
   
   3、问题自查
   ```bash
   cat /usr/local/apisix/logs/error.log | grep pick_server | grep picked_server
   ```
   如果上面命令没有输出就是对的(需开启info级别的error log)。思路就是执行 `pick_server` 的时候正常情况下 `api_ctx` 
变量里是没有 `picked_server` 这个属性存在。
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to