Re: java.lang.OutOfMemoryError

"M. Ranganathan" <[email protected]>
Newsgroups gmane.comp.voip.nist-sip
Message-ID <[email protected]>
You *are* creating dialogs (whether you intended to or not). Further, I 
dont see anything in your mail that implies that you are actually 
destroying the dialogs that you are creating so it is not surpising that 
you are running out of memory. If you dont want to automatically create 
dialogs you should turn it off by setting the following stack 
configuration parameter:

javax.sip.AUTOMATIC_DIALOG_SUPPORT="off"

(see the javadoc for exact spelling etc. )

Michalis Michail wrote:

>Hi again,
>
>I 've build a UAS generating programm ,using the example at
>\jain-sip-1.2\src\examples\reinvite.I create several UAS ,about 200 .These UAS
>expect an INVITE ,respond to it ,and then receive an ACK request.A dialog is
>never created ,i just want to simulate the message flow.Each UAS receives
>these messages about every minute.When i try to run the program for an 20-30
>minutes i start to get a java.lang.OutOfMemoryError finaly i got a:
>
>Error message is null
>*************Stack Trace ************
>java.lang.reflect.InvocationTargetException
>	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>	at
>sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>	at
>sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>	at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
>	at gov.nist.javax.sip.parser.ParserFactory.createParser(ParserFactory.java:225)
>	at
>gov.nist.javax.sip.parser.StringMsgParser.parseMessage(StringMsgParser.java:540)
>	at
>gov.nist.javax.sip.parser.StringMsgParser.parseSIPMessage(StringMsgParser.java:323)
>	at gov.nist.javax.sip.stack.UDPMessageChannel.run(UDPMessageChannel.java:236)
>	at java.lang.Thread.run(Thread.java:534)
>Caused by: java.lang.OutOfMemoryError
>
>
>and the program stoped.
>
>These are the parameters i used for the program:
>
>pr.setProperty("javax.sip.IP_ADDRESS", uac_host);
>		pr.setProperty("javax.sip.STACK_NAME", "sip_uac");
>		// Set TRACE_LEVEL to 0 in your production code for max speed.
>		// Set TRACE_LEVEL to 16 for logging tracesm, and 32 for debug + traces.
>		pr.setProperty("gov.nist.javax.sip.TRACE_LEVEL", "0");
>		pr.setProperty("gov.nist.javax.sip.SERVER_LOG", "log_uac.txt");
>		pr.setProperty("gov.nist.javax.sip.THREADPOOL_SIZE", "infinite");
>		pr.setProperty("gov.nist.javax.sip.CACHE_CLIENT_CONNECTIONS", "false");
>
>I tryed not to set the THREADPOOL_SIZE" and the CACHE_CLIENT_CONNECTIONS
>parameters and i still got the same results.Is there a reason why these is
>happening.I use a similar programm to create the UACs that send the
>requests.After qa UAC  sends the  ACK request ,it dies ,-both UACS and UASs
>are runnable and run in their one threads-,in the next minute more UAcs are
>created and so on.The only difference is that the UAS dont die ,but they keep
>receiving requests,well untill the memory runs out.
>Could you tell the reason this is happening ,and if there is a solution to
>this problem.
>
>
>Thank you MIchael. 
>
> 
>
>_______________________________________________
>nist-sip mailing list
>[email protected]
>http://www-x.antd.nist.gov/mailman/listinfo/nist-sip
>
>  
>


-- 
M. Ranganathan 

Advanced Networking Technologies Division,
National Institute of Standards and Technology (NIST),
100 Bureau Drive, Stop 8920, Gaithersburg, MD 20899. 
tel:301 975 3664 , fax:301 590 0932 http://w3.antd.nist.gov/
Advanced Networking Technologies For the People!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.