Skip to content

[BUG] discarded page must be writable Exception #2586

@sharad-emydex

Description

@sharad-emydex

Version
5.0.20
.NET Framework : 4.8
Litedb used within a Windows Service.

Describe the bug
I see this discarded page must be writable Exception fixed by this PR Update MemoryCache. However, we recently encountered two instances of this exception in our production environment in the last 6 months with the latest version of LiteDb.

It is totally random and there is no way to handle this exception. The service crashes and restarts again and the data is lost. The stack trace does not provide much information.

Code to Reproduce
Unable to reproduce locally, service keeps running and unexpectedly at some point we get this exception

Expected behavior
LiteDb services should be available

Screenshots/Stacktrace

Image

Additional context
Is there any way to handle this exception or prevent the service from crashing? This service is critical for our factory operation and even few minutes downtime causes havoc in the factory and the customer has to revert to manual process. So, any help would be greatly appreciated.

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