Author |
Message
|
career |
Posted: Wed Nov 28, 2007 3:09 pm Post subject: memory exception |
|
|
Apprentice
Joined: 09 Jul 2007 Posts: 36
|
Hi all,
we had .net application (it has c and C++ embedded in it ) communicating to MQ server thru MQ client. today we installed fixpack 6.0.2.2 to overcome the 4 MB message size limitation with MQ server connection.
now we are having a new problem. when ever application trying to put the message to the queue we are getting "memory exception" error. i have checked the mq logs/errors and there is no sign of error. we are getting this error in the application logs.
is there any solution for this problem or should i have to recommend the application team to rebuild the application to destroy the MQ object every time it puts the message and rebulid the object when ever it tries to PUT or GET message ( which no one may like ).
please advice.we are performing the performance tests and every thing is halt. please advice |
|
Back to top |
|
 |
JuulV |
Posted: Thu Nov 29, 2007 1:11 am Post subject: |
|
|
 Apprentice
Joined: 05 Sep 2007 Posts: 28 Location: Belgium
|
I'm not an export in the the .net framework, but it normally should never be required to destroy/rebuild the WMQ objects for every call.
You don't give a lot of details on what the application is doing, nor on the type of "memory exception" you're seeing, but 99.99% of these problems are caused by application errors:
either a pointer not having the correct value (anymore): E.g. the pointer was never initialised; the value of the field is used instead of the address (reference); the address is not correctly passed from one function to the other; ...
or some part of the application (implicitely or explicitely) freed the memory area, and some other part tries to use the area later on...
or the application provides a memory area that's not large enough to hold all the data (causing "buffer overruns")...
If the application used to work before it started using messages over 4MB in size, the problem is most likely in the third category: some internal buffer may be limited to 4MB, some length field may be truncated causing only part of the data to be processed...
Or perhaps WMQ is segmenting the message, and the application can't handle this correctly.
Regards, _________________ Juul Vanparijs
Senior Developer
Cressida Technology Ltd |
|
Back to top |
|
 |
career |
Posted: Thu Nov 29, 2007 9:31 am Post subject: |
|
|
Apprentice
Joined: 09 Jul 2007 Posts: 36
|
Hi juuly and others,
when we installed this fixpack 6.0.2.2 and as the messages are continued to put into the queue and as it continues "some thing" is consuming more and more memory. The memory consumed is becomming more than 1 GB and we are getting ' System.OutOfMemoryException' error.
Is it because of this fixpack??
application is not using any memory to cause buffer overruns.
below is the error message
FileProcessor5.ProcessFile exception: Exception of type 'System.OutOfMemoryException' was thrown.: System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at System.String.GetStringForStringBuilder(String value, Int32 startIndex, Int32 length, Int32 capacity)
at System.Text.StringBuilder.GetNewString(String currentString, Int32 requiredLength)
at System.Text.StringBuilder.Append(String value)
at System.IO.StringWriter.Write(String value)
at System.Xml.XmlTextWriter.InternalWriteEndElement(Boolean longFormat)
at System.Xml.XmlTextWriter.WriteFullEndElement()
at System.Xml.XmlElement.WriteTo(XmlWriter w)
at System.Xml.XmlElement.WriteContentTo(XmlWriter w)
at System.Xml.XmlElement.WriteTo(XmlWriter w)
at System.Xml.XmlElement.WriteContentTo(XmlWriter w)
at System.Xml.XmlElement.WriteTo(XmlWriter w)
at System.Xml.XmlElement.WriteContentTo(XmlWriter w)
at System.Xml.XmlElement.WriteTo(XmlWriter w)
at System.Xml.XmlElement.WriteContentTo(XmlWriter w)
at System.Xml.XmlElement.WriteTo(XmlWriter w)
at System.Xml.XmlElement.WriteContentTo(XmlWriter w)
at System.Xml.XmlElement.WriteTo(XmlWriter w)
at System.Xml.XmlDocument.WriteContentTo(XmlWriter xw)
at System.Xml.XmlNode.get_InnerXml()
at System.Xml.XmlDocument.get_InnerXml()
at ImageValidationService.FileProcessor.SendResults() in C:\ImageValidationService\ImageValidationService1\FileProcessor.vb:line 1172
at ImageValidationService.FileProcessor.ProcessFile() in C:\ImageValidationService\ImageValidationService1\FileProcessor.vb:line 558 |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Nov 29, 2007 9:55 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Looks like your XML parser is using up all your memory, trying to process that big message. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
career |
Posted: Thu Nov 29, 2007 10:37 am Post subject: |
|
|
Apprentice
Joined: 09 Jul 2007 Posts: 36
|
Hi jefflowrey,
Could you suggest me any solution. now the testing is stopped because of this and its is very critical. I am not able to get help from IBM too.
Thanks!! |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Nov 29, 2007 11:06 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I'd look at what Microsoft says about processing "large" XML documents with System.XML... _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Nov 29, 2007 12:57 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
career wrote: |
Could you suggest me any solution. now the testing is stopped because of this and its is very critical. I am not able to get help from IBM too. |
I don't think there's anything MQ here - it's all XML tool / .NET memory management in that error. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
JuulV |
Posted: Fri Nov 30, 2007 12:43 am Post subject: |
|
|
 Apprentice
Joined: 05 Sep 2007 Posts: 28 Location: Belgium
|
Hi Career,
I did a quick Google using "XmlTextWriter OutOfMemoryException", and this revealed 574 matches... At least the first few all seem to be related to this problem with large XML documents. Perhaps some of these may help. _________________ Juul Vanparijs
Senior Developer
Cressida Technology Ltd |
|
Back to top |
|
 |
career |
Posted: Fri Nov 30, 2007 6:03 am Post subject: |
|
|
Apprentice
Joined: 09 Jul 2007 Posts: 36
|
Thanks a lot guyz!! looking into it |
|
Back to top |
|
 |
|