Skip to content

Memory leak in direct connection #846

@yurtsiv

Description

@yurtsiv

Description

The document is not unloaded after invoking DirectConnection.disconnect() if one of store document hooks fails.
The most common scenario is Redis extension failing to acquire the lock.

Scenario

Server A opens/closes many direct connections to documents without any other connections on that server. However, some of those documents might be loaded and updated on server B, occasionally causing the aforementioned lock error. As a result server A slowly accumulates loaded documents.

As a workaround, I'm periodically unloading documents without connections, but I believe the issue should be addressed in Hocuspocus.

Perhaps unloading should occur regardless of store document hook result?

Environment?

  • Hocuspocus version: 2.13.5

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions