<div>I am running tor 4.0.1-alpha inside a docker container with a memory limit (6GB). Tor runs out of memory and aborts or crashes periodically.<br></div><div><br></div><div>Usually I see an error message like this:<br></div><div>Could not mmap file "/var/lib/tor/data/diff-cache/1149": Out of memory<br></div><div>...(repeated some number of times)<br></div><div>followed by segfault<br></div><div><br></div><div>Sometimes I see a message:<br></div><div>Out of memory on malloc(). Dying<br></div><div>followed by abort.<br></div><div><br></div><div>Am I correct to assume the diff-cache is the issue here? Looking at the files it seems they are all pretty small (~500K). Is some badly behaved client requesting 12,000 of these diffs causing my relay to mmap them all at once? or is it just expensive to generate and generating 30-60 at once is enough to use all the memory?<br></div><div><br></div><div>Are there any config options to reject expensive queries or otherwise limit concurrency?<br></div><div><br></div><div>Thanks</div>