Hello,
I'm using rabbitmq 3.6.1-1 on Ubuntu 14.04 and when Rabbit has too many messages (30M in this case) in queue it crashes with a pretty weird message:
Crash dump was written to: erl_crash.dump
eheap_alloc: Cannot allocate 6801972448 bytes of memory (of type "heap").
(Yes, trying to allocate 6.8G)
It's simply repeatable:
1) apt-get install rabbitmq-server
2) use this config:
[
{rabbit, [
{ssl_listeners, [5671]},
{ssl_allow_poodle_attack, true},
{vm_memory_high_watermark, 0.85},
{ssl_options, [
{cacertfile,"/etc/ssl/certs/ssl-cert-snakeoil.pem"},
{certfile,"/etc/ssl/certs/ssl-cert-snakeoil.pem"},
{keyfile,"/etc/ssl/private/ssl-cert-snakeoil.key"},
{verify,verify_none},
{fail_if_no_peer_cert,false}]}
]}
].
3) declare one durable exchange "oops", one durable queue "oops", bind them with routing-key "ble"
4) run this script in a loop:
#!/usr/bin/env python
import pika
import sys
connection = pika.BlockingConnection(pika.ConnectionParameters(host='localhost',credentials=pika.PlainCredentials('admin', 'admin')))
channel = connection.channel()
message = "Hello World!Hello World!Hello World!Hello World!Hello World!Hello World!Hello World!Hello World!Hello World!Hello World!Hello World!Hello World!Hello World!Hello World!Hello World!Hello World!Hello World!Hello World!Hello World!Hello World!Hello World!Hello World!Hello World!Hello World!Hello World!Hello World!Hello World!Hello World!Hello World!Hello World!Hello World!Hello World!Hello World!Hello World!Hello World!Hello World!Hello World!Hello World!Hello World!Hello World!Hello World!Hello World!"
for i in range(0,100000):
channel.basic_publish(exchange='oops',routing_key='ble',body=message)#,properties=pika.BasicProperties(delivery_mode = 2))
connection.close()
5) wait until "enough" messages are published
6) rabbitmq crashes
7) when you start rabbit again, after a while (with no publishers) it crashes again.
I'm getting this on an AWS m4.large instance (4 cores, 16GB RAM). Attaching some collectd graphs from time of crash and before.
Am I doing something wrong or is it a rabbit bug?
Some useful info:
Erlang R16B03 (erts-5.10.4) [source] [64-bit] [smp:4:4] [async-threads:10] [kernel-poll:false]
Linux test-rabbit.aws.px 3.13.0-74-generic #118-Ubuntu SMP Thu Dec 17 22:52:10 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
Thank you for any help,
Michal