代码之家  ›  专栏  ›  技术社区  ›  Bill Leeper

Neo4j服务器安装建议

  •  0
  • Bill Leeper  · 技术社区  · 14 年前

    我的问题是,多次打开Neo4j数据库时出现问题,这会导致错误。我正在升级到Rails3以获取最新的Neo4j.rb,但同时我想确保我有正确的服务器设置。

    以下是我的设置:

    #
    # GlassFish configuration.
    #
    # Please read the comments for each configuration settings before modifying.
    #
    # application environment. Default value development
    
    environment: staging
    # HTTP configuration
      http:
        # port
        port: 3000
    
        #address
        address: 0.0.0.0
    
        # context root. The default value is '/'
        contextroot: /
    
        # Grizzly is NIO based HTTP libraries used by GlassFish gem
        grizzly:
            chunking-enabled: true
            request-timeout: 30
            send-buffer-size: 8192
            max-keepalive-connextions: 256
            keepalive-timeout: 30
            thread-pool:
                idle-thread-timeout-seconds: 900
                max-queue-size: 4096
                max-thread-pool-size: 5
                min-thread-pool-size: 2                
    #Logging configuration
    log:
        log-level: all
    jruby-runtime-pool:
        initial: 1
        min: 1
        max: 5
    daemon:
        enable: true
    
    jvm-options: -server -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=256m -XX:NewRatio=2 -XX:+DisableExplicitGC -Dhk2.file.directory.changeIntervalTimer=6000
    
    
    2 回复  |  直到 14 年前
        1
  •  2
  •   Andreas Ronge    14 年前

    您可以尝试将jruby运行时池最大值设置为1(尚未测试)。 如果您运行的是多线程应用程序(如rails 3和Neo4j),我认为不需要使用多个jruby运行时,对吧?

        2
  •  1
  •   Nick Sieger    14 年前

    方法 Neo4j.start 获取一个可选的Neo数据库实例。我还没有尝试过,但是如果您可以尝试确保只创建一个Neo实例,并确保每个运行时首先查找该共享实例,那么您的多运行时方法可能会工作。