lyft / presto-gateway

A load balancer / proxy / gateway for prestodb
Apache License 2.0
358 stars 156 forks source link

Ehcache Memory Leak #94

Closed OgrockiMatthew closed 4 years ago

OgrockiMatthew commented 4 years ago

Problem: The memory usage of presto-gateway continuously increases when activeJDBC is used. This is causing the need for regular restarts of our presto-gateway instances to free the heap.

Solution: After doing some research we found that this is likely due to the older ehcache version 2 being used by activeJDBC. (https://groups.google.com/forum/#!topic/ehcache-users/SelySlrLp18)

This is supported by a heap dump which shows the majority of the heap being used by 63,000 unreleased instances of a statistics object from ehcache.

I have a pull request ready to merge in to fix this issue.

Screen Shot 2020-02-18 at 4 14 14 PM