I am running Solr in Docker and facing error about reaching the size limit of Zookeeper
NIOServerCnxn Exception causing close of session 0x100015d298b0002: Len error 2248387
I have follow the document https://solr.apache.org/guide/8_4/setting-up-an-external-zookeeper-ensemble.html#configuring-jute-maxbuffer-for-zookeeper-clients but no luck
The default size limit is 1MB -> https://github.com/apache/solr/blob/releases/lucene-solr/8.4.0/solr/core/src/java/org/apache/solr/cloud/autoscaling/sim/SimDistribStateManager.java#L236
Here is the command i use to start solr
$ solr start -cloud -p 8984 -s "/opt/solr/example/cloud/node1/solr" -V
Using Solr root directory: /opt/solr
Using Java: /usr/local/openjdk-11/bin/java
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment 18.9 (build 11.0.6+10)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.6+10, mixed mode)
Configuring SolrCloud to launch an embedded Zookeeper using -DzkRun
Starting Solr using the following settings:
JAVA = /usr/local/openjdk-11/bin/java
SOLR_SERVER_DIR = /opt/solr/server
SOLR_HOME = /opt/solr/example/cloud/node1/solr
SOLR_HOST =
SOLR_PORT = 8984
STOP_PORT = 7984
JAVA_MEM_OPTS = -Xms2G -Xmx6G
GC_TUNE = -XX:+UseG1GC -XX:+PerfDisableSharedMem -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=250 -XX:+UseLargePages -XX:+AlwaysPreTouch
GC_LOG_OPTS = -Xlog:gc*:file=/opt/solr/example/cloud/node1/solr/../logs/solr_gc.log:time,uptime:filecount=9,filesize=20M
SOLR_TIMEZONE = UTC
CLOUD_MODE_OPTS = -DzkClientTimeout=15000 -DzkRun
SOLR_OPTS = -Dsolr.environment=prod -Djute.maxbuffer=536870912 -Xss256k -Dsolr.jetty.https.port=8984
Warning: Available entropy is low. As a result, use of the UUIDField, SSL, or any other features that require
RNG might not work properly. To check for the amount of available entropy, use 'cat /proc/sys/kernel/random/entropy_avail'.
Waiting up to 180 seconds to see Solr running on port 8984 [/]
Started Solr server on port 8984 (pid=2512). Happy searching!
the option jute.maxbuffer have been set, but i still facing the error about size limit
My maximum file is only 2.1M
When i remove all the file upper 1M, the solr cloud running normal
Am i missing something ?
Thank you for reading all of this
I am using this command to spin up solr in docker
docker run -d -p 8983:8983 -e SOLR_JAVA_MEM="-Xms2G -Xmx6G " -e SOLR_OPT="-Djute.maxbuffer=0x300000" -t solr:8.4.0
This will not work, after digging a little bit, i found the the SOLR_JAVA_MEM will over the SOLR_OPT, this command will work for who working on docker (this max file will be 3MB"
docker run -d -p 8983:8983 -e SOLR_JAVA_MEM="-Xms2G -Xmx6G -Djute.maxbuffer=3145728" -t solr:8.4.0"
You will need to change the 0x200000 to real number base on this https://github.com/apache/solr/blob/releases/lucene-solr/8.4.0/solr/core/src/java/org/apache/solr/cloud/autoscaling/sim/SimDistribStateManager.java#L237