tjake/Solandra — Issue #140: Memory Leak in Solandra/Solr
Author: pcoleman
Created: 2011-10-19 15:45:26+00:00
State: open

When handling a large number of solr queries, we noticed there was a memory leak. Each query seems to add to the memory used, and eventually it forces solr to try to free up memory which fails and gets stuck in an infinite loop.

I did some profiling on Solandra and it looks like that most of the memory is dedicated to document fields and the actual field objects (in our case strings). From that it looks like a run away cache, but like the default settings I have all the caches disabled.

I'm including the solr and and solandra settings below:

Solandra:

```
solandra.compression = true

solandra.consistency = QUORUM

solandra.cache.invalidation.check.interval = 1000

solandra.maximum.docs.per.shard = 1048576

solandra.index.id.reserve.size = 65536

solandra.shards.at.once = 4

solandra.write.buffer.queue.size = 200

solandra.keyspace = L

cassandra.retries = 1024

cassandra.retries.sleep = 100
```

Solr:

```

true

1024

true

20
200

false

4

The rest is same as default.
```