Skip to content

Resource leak in CloudWalUploader due to file handles not being closed #1128

@ethiebautgeorge-nasuni

Description

@ethiebautgeorge-nasuni

There are 2 potential resource leaks in CloudWalUploader due to file handles not being closed:

  • file_object is not closed
  • wal_file is not closed

When CloudWalUploader is run in a one-shot call from the CLI, the leak is not noticeable.
However, when run in sequence from a single process, if the Python gc doesn't trigger in a while, then the handles are leaked.
In our case, this leads to a handle exhaustion in our WAL uploader service.

PR: #1129

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions