When using a long running connection using a lot of different prepared statements (eventually, these prepared statements being big statements), these prepared statements get cached.
This can lead to OOM errors, as this cache is unbounded.
This can be solved by 2 or 3 different ways :
- provide an option to disable the cache completely. This will avoid such OOM conditions.
- cache only statements within some size threshold
- use a better cache implementation (LRU for example)
When using a long running connection using a lot of different prepared statements (eventually, these prepared statements being big statements), these prepared statements get cached.
This can lead to OOM errors, as this cache is unbounded.
This can be solved by 2 or 3 different ways :