[
http://jira.jboss.com/jira/browse/JBMESSAGING-1220?page=comments#action_1... ]
Tim Fox commented on JBMESSAGING-1220:
--------------------------------------
I have had a chance to have a look at this.
My initial observations on this case are:
The description reads "buffers an infinite number of messages. " This implies to
me that the prefetchSize has been set to a very large value (default is 150).
With a TCP connection if messages are written to one end of the connection faster than
they are read from the other end of the connection, then eventually the calls to write()
will block. TCP will allow a certain amount of data to be buffered before blocking (TCP
window size).
If prefetchSize has been set to a very large value then you are effectively defaulting to
TCP for flow control.
Default socket timeout is currently set to zero (infinite) so the call to write will block
for ever.
Workaround would be to make sure prefetchSize is set to a value lower than the TCP window
size.
Default TCP window size on Windows and Linux varies so this could account for differences
in behaviour between the operating systems (IIRC it is usually lower on windows ==>
quicker to block).
Unless you can deal with blocking TCP writes you should ensure that prefetch Size is set
to a value that has an effect before the TCP window kicks in.
I will also confer with the remoting team to see if the socket timeout for writes can be
specified separately in the remoting config.
Tyronne - can you verify that setting prefetchSize to a smaller value for the size of
messages solves the problem?
When an JBM client encounters an OOM, it causes to hang the JBM
server
----------------------------------------------------------------------
Key: JBMESSAGING-1220
URL:
http://jira.jboss.com/jira/browse/JBMESSAGING-1220
Project: JBoss Messaging
Issue Type: Bug
Components: Messaging Core
Affects Versions: 1.4.0.SP3_CP01
Environment: Fedora 8, JBM-1.4.0-SP3, JDK-1.5.0_14
Reporter: Tyronne Wickramarathne
Assigned To: Tyronne Wickramarathne
Fix For: 1.4.0.SP3.CP02, 1.4.1.beta2
Attachments: stack_traces.zip, testcase.zip, testcase_win32.zip
1. Connect a JMS Topic Subscriber with limited memory (e.g. -Xmx64m), that buffers an
infinite number of messages.
2. Publish messages to JBM, on the same subscribed topic, until the client runs out of
memory.
3. Try to connect another client, publish more messages, etc. You should see the problem
at this point.
4. Kill the OOM client. The system should recover.
5. at this point, the JBM server gets hanged
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira