Closed vtlkvl closed 1 year ago
@fffonion I've got a fix for the issue. Can I get write access to push a feature branch to make a PR?
@vtlkvl we usually don't grant access to community contributers, please creeate a fork and create PR from there : ) Feel free to ping me when it's ready.
Very good analysis on the memory issue btw 👍
@fffonion I've made a PR. Once it is approved and merged, how long does it take to get a new version?
@vtlkvl I will release a new version once the PR is merged!
It should be resolved in Kong PDK 0.35.
We ran into a memory leak in Kong Plugin Server that can be reproduced as described in https://github.com/vtlkvl/kong-python-pluginserver-memory-leak. We figured out that for each plugin call the messaging queue is added to
PluginServer.events
in PluginServer.handle_event, butPluginServer._step
and specifically removal of the queue is done just for the last plugin. So if you have 10 plugins, 10 queues will be added toPluginServer.events
, but just 1 will be deleted and 9 will remain in the memory and never get GCed. As a resultPluginServer.events
will grow until OOM.