[rabbitmq-discuss] MulticastMain Java client causes Erlang error eheap_alloc: Cannot allocate 467078560 bytes of memory (of type "heap") (with RabbitMQ 1.7.1)

John Apps johndapps at gmail.com
Mon Jan 25 18:27:29 GMT 2010


'Tis with tongue in cheek that I send this along...as the last time I tried
this, it was not supposed to work (always) on Windows.

I have installed 1.7.1 in a new directory, recompiled the Java client and
tried this test again.

This is the contents of rabbitmq.config
[
  {rabbit, [{vm_memory_high_watermark, 3}]},
  {rabbit, [{memory_alarms, true}]},
  {mnesia, [{dump_log_write_threshold, 1000}]},
  {rabbit, []}
].
I have tried various options with the above vm_memory_high_watermark, e.g.,
.4, .6 and so forth, the 3 above being from the last try. Perhaps there more
options that I missed? It would not surprise me.

Running the MulticastMain (Java) test against RabbitMQ with the parameters
shown, leads to an Erlang crash after some time.
The data below is from a Windows 7 X64 machine running JDK 6 X64.

"Cannot allocate 467078560 bytes" is the error message.

C:\AMQP\RabbitMQ\rabbitmq-java-client-1.7.1\test\src>java -server ^
com.rabbitmq.examples.MulticastMain ^
-hlocalhost -p5672 -tdirect -eex1 -i10 -m1024 ^
-n1024 -q20 -r1000 -s100 -x1 -y1
starting consumer #0
starting producer #0
sending rate: 997 msg/s
sending rate: 1000 msg/s
sending rate: 1000 msg/s
sending rate: 1000 msg/s
...
...
...
sending rate: 1000 msg/s
Exception in thread "Thread-1" java.lang.RuntimeException:
com.rabbitmq.client.ShutdownSignalException: connection error; reason:
java.net.SocketException: Connection reset
        at
com.rabbitmq.examples.MulticastMain$Consumer.run(MulticastMain.java:385)
        at java.lang.Thread.run(Unknown Source)
Caused by: com.rabbitmq.client.ShutdownSignalException: connection error;
reason
: java.net.SocketException: Connection reset
        at
com.rabbitmq.client.impl.AMQConnection.shutdown(AMQConnection.java:588)
        at
com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:454)
Caused by: java.net.SocketException: Connection reset
        at java.net.SocketInputStream.read(Unknown Source)
        at java.io.BufferedInputStream.fill(Unknown Source)
        at java.io.BufferedInputStream.read(Unknown Source)
        at java.io.DataInputStream.readUnsignedByte(Unknown Source)
        at com.rabbitmq.client.impl.Frame.readFrom(Frame.java:117)
        at
com.rabbitmq.client.impl.SocketFrameHandler.readFrame(SocketFrameHandler.java:151)
        at
com.rabbitmq.client.impl.AMQConnection.readFrame(AMQConnection.java:379)
        at
com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:420)
...
...
C:\AMQP\RabbitMQ\rabbitmq_server-1.7.1\sbin>"C:\erl5.7.4\bin\erl.exe" -pa
"C:\AM
QP\RabbitMQ\rabbitmq_server-1.7.1\sbin\..\ebin" -enum_args -noinput -boot
start_
sasl "" -sname rabbit -s rabbit +W w +A30 -kernel
inet_default_listen_options "[
{nodelay, true}, {sndbuf, 16384}, {recbuf, 4096}]" -kernel
inet_default_connect_
options "[{nodelay, true}]" -rabbit tcp_listeners "[{\"0.0.0.0\", 5672}]"
-kerne
l error_logger
{file,\""C:/AMQP/RabbitMQ/rabbitmq_server-1.7.1/log/rabbit.log"\"
}  -sasl errlog_type error -sasl sasl_error_logger
{file,\""C:/AMQP/RabbitMQ/rab
bitmq_server-1.7.1/log/rabbit-sasl.log"\"} -os_mon start_cpu_sup true
-os_mon st
art_disksup false -os_mon start_memsup false -os_mon start_os_sup false
-os_mon
memsup_system_only true -os_mon system_memory_high_watermark 0.95 -mnesia
dir \"
"C:/AMQP/RabbitMQ/rabbitmq_server-1.7.1/db/rabbit-mnesia"\"


+---+   +---+
|   |   |   |
|   |   |   |
|   |   |   |
|   +---+   +-------+
|                   |
| RabbitMQ  +---+   |
|           |   |   |
|   v1.7.1  +---+   |
|                   |
+-------------------+
AMQP 8-0
Copyright (C) 2007-2009 LShift Ltd., Cohesive Financial Technologies LLC.,
and R
abbit Technologies Ltd.
Licensed under the MPL.  See http://www.rabbitmq.com/

node          : rabbit at BIGPOOH
app descriptor:
c:/AMQP/RabbitMQ/rabbitmq_server-1.7.0/sbin/../ebin/rabbit.app
home dir      : C:\Users\AppsJ
cookie hash   : 1frVt/baXXdWZIsayTJJ8Q==
log           : C:/AMQP/RabbitMQ/rabbitmq_server-1.7.0/log/rabbit.log
sasl log      : C:/AMQP/RabbitMQ/rabbitmq_server-1.7.0/log/rabbit-sasl.log
database dir  : c:/AMQP/RabbitMQ/rabbitmq_server-1.7.0/db/rabbit-mnesia

starting database             ...done
starting core processes       ...done
starting recovery             ...done
starting persister            ...done
starting guid generator       ...done
starting builtin applications ...done
starting TCP listeners        ...done
starting SSL listeners        ...done

broker running

Crash dump was written to: erl_crash.dump
eheap_alloc: Cannot allocate 467078560 bytes of memory (of type "heap").

This application has requested the Runtime to terminate it in an unusual
way.
Please contact the application's support team for more information.

The crash dump is rather large, so I shall not post it here...but will make
it available if someone requires it.
=erl_crash_dump:0.1
Fri Jan 22 18:44:49 2010
Slogan: eheap_alloc: Cannot allocate 467078560 bytes of memory (of type
"heap").
System version: Erlang R13B03 (erts-5.7.4) [smp:2:2] [rq:2]
[async-threads:30]
Compiled: Tue Nov 24 11:12:28 2009
-- 
---
John Apps
(49) 171 869 1813
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20100125/02cc1285/attachment.htm 


More information about the rabbitmq-discuss mailing list