SHI GmbH Augsburg - Ihr Starker Partner für Search & Big Data, Apache Solr, IT Commerce Lösungen

SHI - Beratung  Entwicklung  Consulting
SHI - Beratung Entwicklung Consulting
Wir beraten und unterstützen Sie mit Schulungen, Trainings und Consulting. Von der Strategieberatung bis zur Anwendungsentwicklung helfen wir Ihnen bei der Optimierung Ihrer
SHI - Support und Service
SHI - Support und Service
Wir sind Dienstleister aus Leidenschaft und verstehen unsere Kunden.
Nach dem Projekt ist vor dem Projekt und individuelle, persönliche
Betreuung stehen bei uns ganz weit oben.
SHI - Individuelle Anwendungen aus Software-Bausteinen
SHI - Individuelle Anwendungen aus Software-Bausteinen
Bei uns bekommen Sie weder Software von der Stange, noch unerprobte Eigenentwicklungen. Wir setzen auf bewährte Open-Source-Technologien und setzen Ihre individuelle Anwendung
aus passenden
Bausteinen zusammen.
SHI - Fast Forward to Success
SHI - Fast Forward to Success
Geschwindigkeit zählt. Bei den Kosten und bei den Erfolgsaussichten.
Bei uns sorgen professionelles Projektmanagement und modulare Entwicklung
für Ihren raschen und effizienten Software-Projekterfolg.

Universal AJAX Live Search

This tutorial shows you how to increase the allowed file size of configuration files in ZooKeeper for SolrCloud collections.


Apache ZooKeeper, Apache Solr


The maximum allowed size of a file stored in ZooKeeper is 0xfffff which is just under 1 MB. In general this does make sense as ZooKeeper is not designed to hold data that is large as this data needs to be shared between the ZooKeeper instances and the clients that connect to ZooKeeper. When working with Solr it is unusual to have files that exceed this limit. But stemming dictionaries or synonym files can do so if they contain a lot of information.


There is an unsafe option that can be used to increase the maximum size of data stored in ZooKeeper. The option that needs to be set is jute.maxbuffer. You can either set a hexadecimal number or an integer value. The value set is the size in bytes. So if you want to store files in ZooKeeper that are 10 MB of size you need to set a value higher than 10485760. In ZooKeeper you need to create a file called java.env in your configuration directory with the following content:

export JVMFLAGS="-Djute.maxbuffer=10500000"

If you only set this value in ZooKeeper you will run into issues as soon as one of your clients (e.g. Solr) wants to do something with that file. Thus, you need to set jute.maxbuffer for your client as well. When using a recent Solr version you can specify Java options by setting them at client startup:

bin/solr start -c -z localhost:2181 -a "-Djute.maxbuffer=10500000"

Of course, this needs to be set in each (ZooKeeper) server and each (Solr) client.
Side note: If you are running on a windows system you need to set the Java option differently for ZooKeeper. In this case you need to adjust the script zkServer.cmd by adding the option in the start command, e.g.

java "-Djute.maxbuffer=10500000" "-Dzookeeper.log.dir=%ZOO_LOG_DIR%" "-Dzookeeper.root.logger=%ZOO_LOG4J_PROP%" -cp "%CLASSPATH%" %ZOOMAIN% "%ZOOCFG%" %*