Skip to content

Memory Leak in sensor-logger #213

@renereimann

Description

@renereimann

While #208 and #200 claim to fix the memory leak in sensor-logger, I still experience memory groth in sensor-logger.

The primary memory leak is not related to postgres.
I run tests with a local compilation of dripline-python where I comment out anything in process_payload
(see https://github.com/driplineorg/dripline-python/blob/main/dripline/implementations/postgres_sensor_logger.py#L45).
This still has the same memory leak rate as before.
I run tests with everything commented out in on_alert_message in https://github.com/driplineorg/dripline-python/blob/main/dripline/core/alert_consumer.py#L41.
There still has the same memory leak rate as before.

If I comment out the line with self.bind_key(...) https://github.com/driplineorg/dripline-python/blob/main/dripline/core/alert_consumer.py#L38
The memory leak is fixed, however in this case no alerts are processed at all.

The bind_key function is bound via pybind11 from dripline::_service::pybind
The on_alert_message is bound via dripline::_endpoint:pybind and endpoint and service trampoline and then overwritten in core/alert_consumer.py

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