apigee / microgateway-plugins

Plugins for microgateway, oauth, analytics, spike arrest, etc...
Other
30 stars 54 forks source link

Memory leak starting with version 3.0.12 #174

Closed fpavageau closed 4 years ago

fpavageau commented 4 years ago

This refactoring between 3.0.11 and 3.0.12 introduced a memory leak, through the dynamic creation of debug instances. See visionmedia/debug#678, and the possible fix currently waiting in visionmedia/debug#740. This impacts apigee-internal/microgateway in version 3.1.0 and above.

A possible fix is to locally cache the debug instance created for each component, instead of creating a new one for each request.

It would also be possible to pass the existing debug instance instead of the component name as the parameter to checkIfAuthorized(), but I guess it's less abstract.