api-gateway
api-gateway copied to clipboard
Memory Leak with Groovy header manipulation
We have an issue with membrane where apparently a memory leak with groovy causes some internal classloader hashmap to increase in size over time, causing membrane to eat up all cpu without actually doing anything. I have a heap dump here but I fail to really understand what is causing this. Anybody else witnessed this?
If you can tell me a place where I can upload a heapdump of this size I'll gladly provide it. The accompanying configuration will follow tomorrow, Membrane in use is 4.6.1 or 4.6.2 (honestly can't tell, will check tomorrow)
Ok I did a little more debugging and it seems that the leak is created with the <groovyTemplate> keyword in my configuration. This keyword is actually not documented but shows up in examples so I used it. Apparently the groovytemplate is compiled and registered to the java class loaders with each invocation of the associated endpoint.