Coder Social home page Coder Social logo

Comments (10)

spacecowboy avatar spacecowboy commented on August 20, 2024 3

@mbsimonovic In 2.3 the environment variables are different:

https://github.com/neo4j/docker-neo4j/blob/master/src/2.3/docker-entrypoint.sh#L22

use NEO4J_CACHE_MEMORY and NEO4J_HEAP_MEMORY instead of NEO4J_dbms_memory_pagecache_size and NEO4J_dbms_memory_heap_maxSize

This described in the 2.3 manual: https://neo4j.com/developer/docker-23/

from docker-neo4j.

EricGT avatar EricGT commented on August 20, 2024 3

With regards to

This does not work using latest or 3.0.

Currently running Neo4j Enterprise 3.4.6 via Docker on Windows 10 [Version 10.0.17134.228]

Have same problem where mounted config directory,
--volume=C:\Users\Eric\Documents/neo4j/conf:/conf with config file neo4j.conf is ignored.

However using command line options with docker run command to change config values works,
e.g. --env=NEO4J_dbms_memory_heap_initial__size=512m --env=NEO4J_dbms_memory_heap_max__size=2G

This can be verified in cypher-shell

neo4j> CALL dbms.listConfig("heap");

+----------------------------------------------------------------------------------------------------------------------------------+
| name                            | description                                                                           | value  |
+----------------------------------------------------------------------------------------------------------------------------------+
| "dbms.memory.heap.initial_size" | "Initial heap size. By default it is calculated based on available system resources." | "512m" |
| "dbms.memory.heap.max_size"     | "Maximum heap size. By default it is calculated based on available system resources." | "2G"   |
+----------------------------------------------------------------------------------------------------------------------------------+

2 rows available after 399 ms, consumed after another 5 ms

Note that while the command line argument names appear to be the same as in Configuration settings take care to read the Neo4j Operations Manual when using Docker; see section 2.5.3.1. Environment variables

Any configuration value (see Section A.1, “Configuration settings”) can be passed using the following naming scheme:
Prefix with NEO4J_.
Underscores must be written twice: _ is written as __.
Periods are converted to underscores: . is written as _.

It would be nice if these important notes were in more than one place, but then again when important notes are in several places, they do not always get updated consistently and then in the future when you find conflicting notes it can be harder to understand.

from docker-neo4j.

wyhhyw avatar wyhhyw commented on August 20, 2024 1

OK. I have found solutions here. However, even these official solutions, it seems useless when using --env=NEO4J_dbms_memory_heap_maxSize=4G. The values in conf files were changed again to 512M.

from docker-neo4j.

hthetiot avatar hthetiot commented on August 20, 2024 1

This does not work using latest or 3.0.
Works with 2.3 image version so far.

from docker-neo4j.

benbc avatar benbc commented on August 20, 2024

@WangAllen What does the command that you use to start the container look like?

from docker-neo4j.

wyhhyw avatar wyhhyw commented on August 20, 2024

I ran the docker with this: docker run -d --name neo4j --publish=7474:7474 --volume=$HOME/neo4j/data:/data --env=NEO4J_dbms_memory_pagecache_size=2G --env=NEO4J_dbms_memory_heap_maxsize=4G neo4j. The container runs but the heap size is still 512M.

from docker-neo4j.

benbc avatar benbc commented on August 20, 2024

@WangAllen Thanks. It would be helpful if you could try again with a precise label rather than relying on latest; that way we have more chance of reproducing your problem.

from docker-neo4j.

wyhhyw avatar wyhhyw commented on August 20, 2024

Yeah, I used the CE V3.0.6 version and the docker version is 1.6.2 on Ubuntu 15.04 (GNU/Linux 3.19.0-15-generic x86_64) platform.

from docker-neo4j.

mbsimonovic avatar mbsimonovic commented on August 20, 2024

How did you fix this? i'm having the same issue on ubuntu 16, docker 1.13, neo 2.3.7 community (neo4j 3.1.1 picks up these variables correctly):

$ docker run  -d -P --name neo --env=NEO4J_AUTH=none --env=NEO4J_dbms_memory_pagecache_size=1G --env=NEO4J_dbms_memory_heap_maxSize=2G  neo4j:2.3.7
$ docker exec -it neo bash -c 'ps axu | grep Xmx' 
root          1 80.1 11.2 3068368 323476 ?      Ssl  09:55   0:23 /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -cp /var/lib/neo4j/lib/ _<skip>_  slf4j-api-1.7.6.jar:/var/lib/neo4j/conf -server -XX:+DisableExplicitGC -Dorg.neo4j.server.properties=conf/neo4j-server.properties -Dlog4j.configuration=file:conf/log4j.properties -XX:+UseG1GC -XX:-OmitStackTraceInFastThrow -XX:hashCode=5 -Dneo4j.ext.udc.source=docker -Xms512m -Xmx512m -Dneo4j.home=/var/lib/neo4j -Dneo4j.instance=/var/lib/neo4j -Dfile.encoding=UTF-8 org.neo4j.server.CommunityBootstrapper

So despite --env=NEO4J_dbms_memory_heap_maxSize=2G, the server gets -Xmx512m. NEO4J_AUTH=none is however correctly applied.

from docker-neo4j.

mbsimonovic avatar mbsimonovic commented on August 20, 2024

@spacecowboy thanks! Maybe the docs should be updated.

from docker-neo4j.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.