Skip to content

Memory leak in version 1.22.0 #496

Open
@rausnitz

Description

@rausnitz

Describe the issue

Memory usage spiked when we deployed our application with postgres-nio 1.22.0.

Vapor version

4.102.1

Operating system and version

Linux

Swift version

Swift 5.10

Steps to reproduce

Run a Swift backend application that uses postgres-nio and compare the memory usage when on 1.21.5 and 1.22.0.

Outcome

Memory usage steadily increases after starting an application that uses postgres-nio 1.22.0.

Additional notes

We observed this on an instance that runs recurring jobs but does not receive web traffic, so memory usage tends to be stable over time.

In the attached screenshot, the first release to include postgres-nio 1.22.0 was on July 26. The sudden drops in memory usage indicate when new releases went live, restarting the app. The graph stabilizes on July 30 when we reverted postgres-nio to 1.21.5.

postgres-nio-memory

Edit: I'm not sure if the memory usage spikes in 1.21.6 or 1.22.0.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions