Neo4j WARNING: Max 1024 open files allowed, minimum of 40 000 recommended. See the Neo4j manual

前端 未结 8 1648
孤街浪徒
孤街浪徒 2020-12-13 17:17

I installed Neo4j on Ubuntu 12.04 using these instructions: http://www.neo4j.org/download/linux

wget -O - http://debian.neo4j.org/neotechnology.gpg.key | apt         


        
8条回答
  •  情深已故
    2020-12-13 17:58

    The solutions posted by @israel and by @Tomasz Swider did not work for me (I am running Ubuntu 14.04). However, I could get rid of this warning by modifying the file /etc/init.d/neo4j-service as suggested by @zwol in the comments below the question:

    I added the line ulimit -n 40000 to the do_start() method in this file. In my case this method then looks as follows:

    do_start()
    {
            # Return
            #   0 if daemon has been started
            #   1 if daemon was already running
            #   2 if daemon could not be started
            ulimit -n 40000
            start-stop-daemon --chuid ${NEO_USER} --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
                    || return 1
            start-stop-daemon --chuid ${NEO_USER} --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
                    $DAEMON_ARGS \
                    || return 2
    }
    

    When I then start the service by using the command

    sudo service neo4j-service start
    

    it starts without the warning and returns the following message:

    Starting Neo4j Server...WARNING: not changing user
    process [9921]... waiting for server to be ready...... OK.
    http://localhost:7474/ is ready.
    

    I am not sure whether that is the way to go but as written above, that was the only solution that has worked for me so far to get rid of this warning.

    EDIT:

    Have not tested it, but seems there is now an easier solution available: see @Schrodinger's'Cat's answer.

提交回复
热议问题