Skip to content

Memory leak on Leptos 0.6.15 and actix-web 4.8 #36

@bitemyapp

Description

@bitemyapp

pub(crate) fn register_observer_handle_cleanup<K, V, Fu>(

image

image

Led to OOM kills, servers getting bounced. Was worse under libc malloc than jemalloc but it definitely still happens under jemalloc.

Tracked it down finally by very gently loading up a local instance of the server running in release mode + debug symbols w/ libc malloc under heaptrack with watch running curl at interval -n 1 in a few terminal tabs. Using drill made the server thrash and crash.

Seeing leaks that trace back to register_observer_handle_cleanup, ResourceData, get_state, etc. The common roots seem to be QueryState's .clone() and ResourceData's.

I'll be trying to figure out the least invasive way to disable leptos_query in the server so I can stop the bleeding.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions