Skip to content

Memory leak when using newPlot or update #28

@Alterock13

Description

@Alterock13

Hi,

I'm running Plotly as a way to display data coming from a database, with around 800 new points/second.
As I let my application running, I notice that my RAM usage is steadily inscreasing, eating up to 10Gb of RAM over the course of half an hour.

Looking at Plotly issues on GitHub, I've noticed that Plotly users have reported that it was happening to them 1755 but I think that a recent patch was supposed to fix that.

I've tried both newPlot and update as a way to refresh my plot. Here's my current code :

       this.interval = interval(1000);
       this.subscribe = this.interval.subscribe(val => {
                this.traces = [this.data[0]];
                this.lastUpdateChange.emit(new Date());
                if(this.highThresholdEnabled || this.lowThresholdEnabled){
                    this.onThresholdChange();
                } else{
                    Plotly.update(
                        this.layout['title'], 
                        this.traces, this.layout, 
                        this.options)
                }});

I'm running out of ideas for this problem, does anyone know how I could stop this memory leak?

Thanks in advance.

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