[rabbitmq-discuss] System.OutOfMemoryException

Simon MacMullen simon at rabbitmq.com
Thu Mar 13 17:21:40 GMT 2014


I am no .net expert but my guess might be that you have too many threads 
(i.e. possibly too many connections).

Each thread needs to reserve a certain amount of memory in the process 
address space; too many threads (especially on a 32 bit process) can 
exhaust the address space before you come anywhere near running out of 
actual committed memory.

Cheers, Simon

On 13/03/14 17:07, Phil Marino wrote:
> Hi - we're running RabbitMQ 3.1.3 on Windows Server 2008 R2, using the
> .Net Rabbit client library.
> We're troubleshooting a distributed transaction problem involving
> Oracle.  But when this problem happens, we also see thes from Rabbit:
> 2014-03-13 12:27:12,706 [1237] ERROR Services.Messaging.MessageService
> :: (null) > MessageTransaction.Prepared Failed: None of the specified
> endpoints were reachable
> Endpoints attempted:
> ------------------------------------------------
> endpoint=amqp-0-9://localhost:5672, attempts=1
> System.OutOfMemoryException: Exception of type
> 'System.OutOfMemoryException' was thrown.
>     at System.Threading.Thread.StartInternal(IPrincipal principal,
> StackCrawlMark& stackMark)
>     at System.Threading.Thread.Start(StackCrawlMark& stackMark)
>     at System.Threading.Thread.Start()
>     at RabbitMQ.Client.Impl.ConnectionBase.StartMainLoop()
>     at RabbitMQ.Client.Impl.ConnectionBase..ctor(ConnectionFactory
> factory, Boolean insist, IFrameHandler frameHandler)
>     at
> RabbitMQ.Client.Framing.Impl.v0_9_1.ProtocolBase.CreateConnection(ConnectionFactory
> factory, Boolean insist, IFrameHandler frameHandler)
>     at RabbitMQ.Client.ConnectionFactory.FollowRedirectChain(Int32
> maxRedirects, IDictionary connectionAttempts, IDictionary
> connectionErrors, AmqpTcpEndpoint[]& mostRecentKnownHosts,
> AmqpTcpEndpoint endpoint)
> ================================================
> Stack trace:
>     at RabbitMQ.Client.ConnectionFactory.CreateConnection(Int32
> maxRedirects)
>     at RabbitMQ.Client.ConnectionFactory.CreateConnection()
>     at
> Services.Messaging.MessageService.MessageTransaction.Prepare(PreparingEnlistment
> preparingEnlistment) in
> h:\wbuildda04_agent11\work\b331189cb185f77c\Services.Messaging\MessageService.svc.cs:line
> 208
> and
> 2014-03-13 12:27:12,722 [1237] ERROR
> System.ServiceModel.Diagnostics.DiagnosticTrace :: TraceEvent >
> <TraceRecord
> xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord"
> Severity="Error"><TraceIdentifier>http://msdn.microsoft.com/en-US/library/System.ServiceModel.Diagnostics.TraceHandledException.aspx</TraceIdentifier><Description>Handling
> an
> exception.</Description><AppDomain>/LM/W3SVC/3/ROOT/services.messaging1.0-1-130391077949327736</AppDomain><Exception><ExceptionType>System.Transactions.TransactionAbortedException,
> System.Transactions, Version=4.0.0.0, Culture=neutral,
> PublicKeyToken=b77a5c561934e089</ExceptionType><Message>The transaction
> has aborted.</Message><StackTrace>   at
> System.Transactions.TransactionStateAborted.EndCommit(InternalTransaction tx)
>     at System.Transactions.CommittableTransaction.Commit()
>     at
> System.ServiceModel.Dispatcher.TransactionInstanceContextFacet.Complete(Transaction
> transaction, Exception
> error)</StackTrace><ExceptionString>System.Transactions.TransactionAbortedException:
> The transaction has aborted. ---&gt;
> RabbitMQ.Client.Exceptions.BrokerUnreachableException: None of the
> specified endpoints were reachable
>     at RabbitMQ.Client.ConnectionFactory.CreateConnection(Int32
> maxRedirects)
>     at RabbitMQ.Client.ConnectionFactory.CreateConnection()
>     at
> Services.Messaging.MessageService.MessageTransaction.Prepare(PreparingEnlistment
> preparingEnlistment) in
> h:\wbuildda04_agent11\work\b331189cb185f77c\Services.Messaging\MessageService.svc.cs:line
> 208
>     --- End of inner exception stack trace ---
>     at
> System.Transactions.TransactionStateAborted.EndCommit(InternalTransaction tx)
>     at System.Transactions.CommittableTransaction.Commit()
>     at
> System.ServiceModel.Dispatcher.TransactionInstanceContextFacet.Complete(Transaction
> transaction, Exception
> error)</ExceptionString><InnerException><ExceptionType>RabbitMQ.Client.Exceptions.BrokerUnreachableException,
> RabbitMQ.Client, Version=2.8.7.0, Culture=neutral,
> PublicKeyToken=89e7d7c5feba84ce</ExceptionType><Message>None of the
> specified endpoints were reachable</Message><StackTrace>   at
> RabbitMQ.Client.ConnectionFactory.CreateConnection(Int32 maxRedirects)
>     at RabbitMQ.Client.ConnectionFactory.CreateConnection()
>     at
> Services.Messaging.MessageService.MessageTransaction.Prepare(PreparingEnlistment
> preparingEnlistment) in
> h:\wbuildda04_agent11\work\b331189cb185f77c\Services.Messaging\MessageService.svc.cs:line
> 208</StackTrace><ExceptionString>None of the specified endpoints were
> reachable
> Endpoints attempted:
> ------------------------------------------------
> endpoint=amqp-0-9://localhost:5672, attempts=1
> System.OutOfMemoryException: Exception of type
> 'System.OutOfMemoryException' was thrown.
>     at System.Threading.Thread.StartInternal(IPrincipal principal,
> StackCrawlMark&amp; stackMark)
>     at System.Threading.Thread.Start(StackCrawlMark&amp; stackMark)
>     at System.Threading.Thread.Start()
>     at RabbitMQ.Client.Impl.ConnectionBase.StartMainLoop()
>     at RabbitMQ.Client.Impl.ConnectionBase..ctor(ConnectionFactory
> factory, Boolean insist, IFrameHandler frameHandler)
>     at
> RabbitMQ.Client.Framing.Impl.v0_9_1.ProtocolBase.CreateConnection(ConnectionFactory
> factory, Boolean insist, IFrameHandler frameHandler)
>     at RabbitMQ.Client.ConnectionFactory.FollowRedirectChain(Int32
> maxRedirects, IDictionary connectionAttempts, IDictionary
> connectionErrors, AmqpTcpEndpoint[]&amp; mostRecentKnownHosts,
> AmqpTcpEndpoint endpoint)
> ================================================
> Stack trace:
>     at RabbitMQ.Client.ConnectionFactory.CreateConnection(Int32
> maxRedirects)
>     at RabbitMQ.Client.ConnectionFactory.CreateConnection()
>     at
> Services.Messaging.MessageService.MessageTransaction.Prepare(PreparingEnlistment
> preparingEnlistment) in
> h:\wbuildda04_agent11\work\b331189cb185f77c\Services.Messaging\MessageService.svc.cs:line
> 208</ExceptionString><DataItems><Data><Key>amqp-0-9://localhost:5672</Key><Value>System.OutOfMemoryException:
> Exception of type 'System.OutOfMemoryException' was thrown.
>     at System.Threading.Thread.StartInternal(IPrincipal principal,
> StackCrawlMark&amp; stackMark)
>     at System.Threading.Thread.Start(StackCrawlMark&amp; stackMark)
>     at System.Threading.Thread.Start()
>     at RabbitMQ.Client.Impl.ConnectionBase.StartMainLoop()
>     at RabbitMQ.Client.Impl.ConnectionBase..ctor(ConnectionFactory
> factory, Boolean insist, IFrameHandler frameHandler)
>     at
> RabbitMQ.Client.Framing.Impl.v0_9_1.ProtocolBase.CreateConnection(ConnectionFactory
> factory, Boolean insist, IFrameHandler frameHandler)
>     at RabbitMQ.Client.ConnectionFactory.FollowRedirectChain(Int32
> maxRedirects, IDictionary connectionAttempts, IDictionary
> connectionErrors, AmqpTcpEndpoint[]&amp; mostRecentKnownHosts,
> AmqpTcpEndpoint
> endpoint)</Value></Data></DataItems></InnerException></Exception></TraceRecord>
> I will say that the server appears to have plenty of RAM available.
> I'm sure that I don't have enough information to identify what's
> happening, so one question I have is: what else do I need?
> It looks like we're trying to enlist in an aborted transaction, but I'm
> not sure why the Out Of Memory exception is thrown.  Any suggestions?
> Thanks,
> Phil
>
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>


-- 
Simon MacMullen
RabbitMQ, Pivotal


More information about the rabbitmq-discuss mailing list