i have 25 message producers (wrtten in ruby), using stomp. each producer
sends 1 message per second to the same queue. on the other side, i have 10
consumers (written in java) on the same queue. the connections are all
created up-front. i am using mysql as the persistent store.
<persistenceAdapter>
<journaledJDBC journalLogFiles="5" dataDirectory="../activemq-data"
dataSource="#mysql-ds"/>
</persistenceAdapter>
i got too many files opened error when the queue size exceeds (approximate)
34600. if i re-ran the test with longer think time for my message producers,
therefore limiting QueueSize to smal or 0, then the test ran with no
problem.
i read on this forum about some other problems encountered while using
stomp. is this related? how good is stomp support now?
thanks in advance.
James.Strachan wrote:
>
> Could you explain what you're doing? e.g. how many JMS connections are
> you creating? Do you create them up front?
>
> http://incubator.apache.org/activemq/how-do-i-use-jms-efficiently.html
>
> On 10/13/06, igah <weiqingh@mail.com> wrote:
>>
>> yes, i ran out of file descriptors. but the question is why activemq
>> opened
>> so many sockets.
>>
>> when the load test started, iactivemq only has 90 files opened. if i have
>> enough number of consumers to process the messages (therefore QueueSize
>> is
>> always almost 0), then it never opens any more sockets.
>>
>> when the number of consumers is decreased and there is a large backlog on
>> the queue, activemq suddently opens more and more sockets till it hits
>> the
>> ulimit (1024) when it throws the exceptions.
>>
>>
>> James.Strachan wrote:
>> >
>> > It looks like you are just running out of file descriptors; file
>> > descriptors are used for sockets as well as files and other OS things.
>> > Usually its a simple change on your OS to bump that value up to
>> > something much higher.
>> >
>> > On 10/13/06, igah <weiqingh@mail.com> wrote:
>> >>
>> >> hi there,
>> >>
>> >> i have a number of stomp clients that post messages continously to a
>> >> single
>> >> queue. if the consumer on that queue doesn't process the messages fast
>> >> enough, i am seeing this error in the activemq (version 4.0.1) log:
>> >>
>> >> ERROR TransportConnector - Could not accept connection:
>> >> java.net.SocketException: Too many open files
>> >> java.net.SocketException: Too many open files
>> >> at java.net.PlainSocketImpl.socketAccept(Native Method)
>> >> at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)
>> >> at java.net.ServerSocket.implAccept(ServerSocket.java:450)
>> >> at java.net.ServerSocket.accept(ServerSocket.java:421)
>> >> at
>> >>
>> org.apache.activemq.transport.tcp.TcpTransportServer.run(TcpTransportServer.java:123)
>> >> at java.lang.Thread.run(Thread.java:595)
>> >>
>> >> jmx console shows that the following for the queue:
>> >> DequeueCount 6847
>> >> EnqueueCount 40800
>> >> QueueSize 34593
>> >>
>> >> lsof shows the activemq process opens about 1000 files (most of them
>> TCP
>> >> sockets) at the time of the failure. if i add more consumers to
>> process
>> >> those messages, then the test can run for a long time with no failure.
>> >>
>> >> how can i address this issue? am i missing some tuning configuration
>> >> parameters? (the activemq instance is configured to use mysql)
>> >>
>> >> thanks in advance.
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Could-not-accept-connection-after-too-many-messages-in-the-queue-tf2437563.html#a6797112
>> >> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>> > --
>> >
>> > James
>> > -------
>> > http://radio.weblogs.com/0112098/
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Could-not-accept-connection-after-too-many-messages-in-the-queue-tf2437563.html#a6799518
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
>
>
> --
>
> James
> -------
> http://radio.weblogs.com/0112098/
>
>
--
View this message in context: http://www.nabble.com/Could-not-accept-connection-after-too-many-messages-in-the-queue-tf2437563.html#a6837497
Sent from the ActiveMQ - User mailing list archive at Nabble.com.