neo4j / neo4j-browser

Neo4j Browser is the general purpose user interface for working with Neo4j. Query, visualize, administrate and monitor the database.
https://neo4j.com
GNU General Public License v3.0
689 stars 347 forks source link

Memory usage grows rapidly and freezes browser #874

Open Eric-Showers opened 5 years ago

Eric-Showers commented 5 years ago

Description

Once connected to a server's browser page, memory usage quickly grows to >3GB after a few minutes. This eventually freezes Firefox, forcing me to kill the process. Neo4J Browser is essentially unresponsive while this is happening - other than a few actions given at the very start.

I am currently experiencing this with two different databases, both of which are running different database versions AND browser versions from each other. One of the databases is a causal cluster where this only occurs with the leader node.

Reproduce Steps

This seems to coincide with times that the databases are under heavy load. Once connected to the browser page no additional steps are needed, the memory usage will rise without any user actions.

Expected Behavior

If the server is under heavy load I expect the neo-browser UI to run slow - but the memory usage is far beyond expected behavior.

Your Environment

software name version
OS Win10, Ubuntu 14
Web browser Firefox 63
Neo4j Browser 3.1.4 and 3.2.13
Neo4j Enterprise 3.3.4 and 3.4.10

Let me know if any additional information would help narrow down the cause.

oskarhane commented 5 years ago

Interesting, thanks for the detailed report. We'll have a look at it.

IdrissMdb commented 5 years ago

Same issue on Chrome Version 71.0.3578.98 (Official Build) (64-bit) [on Windows 10 and Macos] while running a heavy query to merge nodes

Eric-Showers commented 5 years ago

@IdrissMdb Have you tried toggling any browser extension/add-ons yet? I seem to have less occurrences of this memory issue after disabling some extensions, but it is hard for me to confirm this as a fix. This bug's behavior has been inconsistent with changes to my environment and my database conditions are inconsistent due to multiple users/loads.

If you are able to isolate your DB env/conditions it would be helpful to know what the effects of extensions/add-ons are :smiley:

IdrissMdb commented 5 years ago

i'm not really able to be categoric about the exact reason, i made some tests on multiple browsers/computers with and without extensions.

i can run big queries without strange memory issues (returning all lines/count of lines) but there was others where the memory issue happened (on all the computers/browsers/with and without extensions), i was using apoc.refactor.mergeNodes while still having neo4j-uuid plugin enabled (the merge wasn't working due to that plugin)

So i don't really know if these factors are even relevant or not.

IdrissMdb commented 5 years ago

Weird thing, i executed a heavy edit query on the browser (chrome/firefox with and without extentions) that uses all the ram available and end up by crashing the browser. Then i made an other test, i left Neo4j browser open on chrome doing nothing, and on the same time, i execute the same heavy edit query on a c# program, and chrome crashed almost at the same time. so i have no idea, of the how and why.

charleskoehl commented 4 years ago

Same issue in Chrome Version 79.0.3945.88 with all extensions disabled, but not in Chrome 68 when Neo4j Desktop Version 1.2.1 (1.2.1.1042) uses it as its browser.

The issue does not occur in incognito mode in in Chrome Version 79.0.3945.88 though, which is strange, because it still occurs in regular mode with all extensions manually disabled. (I restarted Chrome after disabling all extensions.)

charleskoehl commented 4 years ago

Experimented a bit further with Chrome 79.0.3945.88 and was able to reliably fix the issue by not signing into Neo4j Browser Sync. I confirmed this with Incognito mode, and not in Incognito mode with all extensions disabled. In both cases, the issue occurs if I am already logged into Neo4j Browser Sync when I run a query that returns a handful of nodes and relationships.