In order to try out RabbitMQ with our workload, I fired up an EC2 instance and added ~42 mil messages to one of the queues.
All the messages got added to the persistent queue just fine, but then I kill -9'ed the RabbitMQ instance to test whether it would start up after being shut down abruptly. I'm aware that the proper way to stop the server is via "rabbitmqctl stop" but I wanted to see what would happen on a system crash and such.
Now the problem is that upon startup, the server tries to rebuild the index with "rebuilding indices from scratch", apparently uses up all the memory and dies silently:
=INFO REPORT==== 26-May-2016::14:08:20 ===
Starting RabbitMQ 3.6.2 on Erlang 18.3
Copyright (C) 2007-2016 Pivotal Software, Inc.
=INFO REPORT==== 26-May-2016::14:08:20 ===
node : mediacloud@localhost
home dir : /home/ubuntu
config file(s) : /mediacloud/data/rabbitmq/rabbitmq.config
cookie hash : 6RiAbVAbV1rGeqQ/Q2/AJQ==
log : /mediacloud/data/rabbitmq/logs/media...@localhost.log
sasl log : /mediacloud/data/rabbitmq/logs/media...@localhost-sasl.log
database dir : /mediacloud/data/rabbitmq/mnesia/mediacloud@localhost
=INFO REPORT==== 26-May-2016::14:08:23 ===
Memory limit set to 1506MB of 3766MB total.
=INFO REPORT==== 26-May-2016::14:08:23 ===
Disk free limit set to 50MB
=INFO REPORT==== 26-May-2016::14:08:23 ===
Limiting to approx 65436 file handles (58890 sockets)
=INFO REPORT==== 26-May-2016::14:08:23 ===
FHC read buffering: OFF
FHC write buffering: ON
=INFO REPORT==== 26-May-2016::14:08:23 ===
Priority queues enabled, real BQ is rabbit_variable_queue
=INFO REPORT==== 26-May-2016::14:08:23 ===
Management plugin: using rates mode 'basic'
=INFO REPORT==== 26-May-2016::14:08:23 ===
msg_store_transient: using rabbit_msg_store_ets_index to provide index
=INFO REPORT==== 26-May-2016::14:08:23 ===
msg_store_persistent: using rabbit_msg_store_ets_index to provide index
=WARNING REPORT==== 26-May-2016::14:08:23 ===
msg_store_persistent: rebuilding indices from scratch
=INFO REPORT==== 26-May-2016::14:29:05 ===
vm_memory_high_watermark set. Memory used:1868367216 allowed:1579615846
=WARNING REPORT==== 26-May-2016::14:29:05 ===
memory resource limit alarm set on node mediacloud@localhost.
**********************************************************
*** Publishers will be blocked until this alarm clears ***
**********************************************************