Skip to content

Prepared statements cache can lead to memory exhaustion #38

@StephG38

Description

@StephG38

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 :

  1. provide an option to disable the cache completely. This will avoid such OOM conditions.
  2. cache only statements within some size threshold
  3. use a better cache implementation (LRU for example)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions