473,800 Members | 2,342 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Out of memory error!

Hi,

I am using MTOM and WSE 2.0 and trying to upload a file which is
almost 70MB (big). I have setup the timeout to a good size and file
size limit to 100MB in the server. The uploading is coming through T3
pipe. Even with all the changes, I get a 'out of memory' error. Can
someone help?

In my code, I am reading the file into a byte array. I don't think
reading the byte array has any problem.

Following is the actual exception

System.OutOfMem oryException: Exception of type
'System.OutOfMe moryException' was thrown.
at System.String.G etStringForStri ngBuilder(Strin g value, Int32
startIndex, Int32 length, Int32 capacity)
at System.Convert. ToBase64String( Byte[] inArray, Int32 offset,
Int32 length, Base64Formattin gOptions options)
at System.Convert. ToBase64String( Byte[] inArray)
at Microsoft.Web.S ervices3.Mime.X opNodeData.GetS tring()
at Microsoft.Web.S ervices3.Mime.X opContentsNode. get_Data()
at System.Xml.XmlT ext.get_Value()
at
Microsoft.Web.S ervices3.Securi ty.Xml.ElementC anonicalization Dispatcher.Writ e(XmlNode
node)
at
Microsoft.Web.S ervices3.Securi ty.Xml.ElementC anonicalization Dispatcher.Writ eElement(XmlEle ment
node)
at
Microsoft.Web.S ervices3.Securi ty.Xml.ElementC anonicalization Dispatcher.Writ e(XmlNode
node)
at
Microsoft.Web.S ervices3.Securi ty.Xml.ElementC anonicalization Dispatcher.Writ eElement(XmlEle ment
node)
at
Microsoft.Web.S ervices3.Securi ty.Xml.ElementC anonicalization Dispatcher.Writ e(XmlNode
node)
at
Microsoft.Web.S ervices3.Securi ty.Xml.ElementC anonicalization Dispatcher.Writ eElement(XmlEle ment
node)
at
Microsoft.Web.S ervices3.Securi ty.Xml.ElementC anonicalization Dispatcher.Writ e(XmlNode
node)
at
Microsoft.Web.S ervices3.Securi ty.Xml.Canonica lizationDriver. WriteTo(Canonic alEncoder
encoder)
at
Microsoft.Web.S ervices3.Securi ty.Xml.XmlDsigE xcC14NTransform .GetHashedOutpu t(HashAlgorithm
hash)
at
Microsoft.Web.S ervices3.Securi ty.TransformCha in.TransformAnd Hash(Object
inputObject, HashAlgorithm algorithm)
at
Microsoft.Web.S ervices3.Securi ty.SignatureRef erence.Calculat eHashValue(XmlD ocument
document, CanonicalXmlNod eList refList)
at
Microsoft.Web.S ervices3.Securi ty.MessageSigna ture.BuildDiges tedReferences()
at
Microsoft.Web.S ervices3.Securi ty.MessageSigna ture.ComputeKey edHashSignature (SymmetricKeyAl gorithm
key)
at
Microsoft.Web.S ervices3.Securi ty.MessageSigna ture.ComputeSig nature()
at
Microsoft.Web.S ervices3.Securi ty.Security.Ser ializeXml(SoapE nvelope
document)
at
Microsoft.Web.S ervices3.Securi ty.SecurityOutp utFilter.Proces sHeader(Securit y
security, SoapEnvelope envelope)
at
Microsoft.Web.S ervices3.Securi ty.SecurityOutp utFilter.Proces sMessage(SoapEn velope
envelope)
at
Microsoft.Web.S ervices3.Securi ty.Wse2Pipeline Policy.LegacyFi lterWrapper.Pro cessMessage(Soa pEnvelope
envelope)
at
Microsoft.Web.S ervices3.Pipeli ne.ProcessOutpu tMessage(SoapEn velope
envelope)
at Microsoft.Web.S ervices3.Xml.So apEnvelopeWrite r.Finish()
at Microsoft.Web.S ervices3.Xml.Xm lWrappingWriter .Flush()
at
System.Web.Serv ices.Protocols. SoapHttpClientP rotocol.Seriali ze(SoapClientMe ssage
message)
at
System.Web.Serv ices.Protocols. SoapHttpClientP rotocol.Invoke( String
methodName, Object[] parameters)

Mar 29 '07 #1
1 9306
Hi there.

Did you manage to find a fix?

I am seeing something very similar with MTOM + WSE3. I have modified the
WSE 3 sample "BinaryDataMTOM " so that the sample method RunPutStreaming tries
to upload a very large file(200MB). I am running the client and the server
within Visual Studio on the same physical host.

Like you, I have also adjusted the web.config and machine.config files to
include:

<httpRuntime maxRequestLengt h="200000" useFullyQualifi edRedirectUrl=" true"
executionTimeou t="5000" />

and I've also added this to my web.config:
<messaging>
<mtom serverMode="opt ional" />
<maxMessageLeng th value="1024000" />
</messaging>

I can successfully send a file of 5MB to the server, but with 200MB I get
this exception:

A first chance exception of type 'System.OutOfMe moryException' occurred in
Microsoft.Web.S ervices3.dll
System.OutOfMem oryException: Exception of type 'System.OutOfMe moryException'
was thrown.
at System.String.G etStringForStri ngBuilder(Strin g value, Int32
startIndex, Int32 length, Int32 capacity)
at System.Convert. ToBase64String( Byte[] inArray, Int32 offset, Int32
length, Base64Formattin gOptions options)
at System.Convert. ToBase64String( Byte[] inArray)
at Microsoft.Web.S ervices3.Mime.X opNodeData.GetS tring()
at Microsoft.Web.S ervices3.Mime.X opContentsNode. get_Data()
at System.Xml.XmlT ext.get_Value()
at System.Xml.XmlD ocument.ImportN odeInternal(Xml Node node, Boolean deep)
at System.Xml.XmlD ocument.ImportC hildren(XmlNode fromNode, XmlNode
toNode, Boolean deep)
at System.Xml.XmlD ocument.ImportN odeInternal(Xml Node node, Boolean deep)
at System.Xml.XmlD ocument.ImportC hildren(XmlNode fromNode, XmlNode
toNode, Boolean deep)
at System.Xml.XmlD ocument.ImportN odeInternal(Xml Node node, Boolean deep)
at System.Xml.XmlD ocument.ImportC hildren(XmlNode fromNode, XmlNode
toNode, Boolean deep)
at System.Xml.XmlD ocument.ImportN odeInternal(Xml Node node, Boolean deep)
at System.Xml.XmlD ocument.ImportC hildren(XmlNode fromNode, XmlNode
toNode, Boolean deep)
at System.Xml.XmlD ocument.ImportN odeInternal(Xml Node node, Boolean deep)
at System.Xml.XmlD ocument.ImportC hildren(XmlNode fromNode, XmlNode
toNode, Boolean deep)
at System.Xml.XmlD ocument.ImportN odeInternal(Xml Node node, Boolean deep)
at System.Xml.XmlD ocument.ImportN ode(XmlNode node, Boolean deep)
at Microsoft.Web.S ervices3.SoapFi lter.CreateTrac eEntry(Type processor,
String description, XmlNode content)
at Microsoft.Web.S ervices3.Pipeli ne.ProcessOutpu tMessage(SoapEn velope
envelope)
at Microsoft.Web.S ervices3.Xml.So apEnvelopeWrite r.Finish()
at Microsoft.Web.S ervices3.Xml.Xm lWrappingWriter .Flush()
at
System.Web.Serv ices.Protocols. SoapHttpClientP rotocol.Seriali ze(SoapClientMe ssage message)
at System.Web.Serv ices.Protocols. SoapHttpClientP rotocol.Invoke( String
methodName, Object[] parameters)
at
localhost.Binar yDataMTOMServic eWse.PutFileStr eaming(GetFileR equestStreaming
getFileResponse Streaming) in C:\Program Files\Microsoft
WSE\v3.0\Sample s\CS\QuickStart \Basic\BinaryDa taMTOM\BinaryDa taMTOMClient\We b
References\loca lhost\Reference .cs:line 148
at BinaryDataMTOMC lient.BinaryDat aMTOMClient.Run PutStreaming() in
C:\Program Files\Microsoft
WSE\v3.0\Sample s\CS\QuickStart \Basic\BinaryDa taMTOM\BinaryDa taMTOMClient\Bi naryDataMTOMCli ent.cs:line 148
at BinaryDataMTOMC lient.BinaryDat aMTOMClient.Mai n(String[] args) in
C:\Program Files\Microsoft
WSE\v3.0\Sample s\CS\QuickStart \Basic\BinaryDa taMTOM\BinaryDa taMTOMClient\Bi naryDataMTOMCli ent.cs:line 66

Can anyone offer a suggestion please?

Thanks.
"DBC User" wrote:
Hi,

I am using MTOM and WSE 2.0 and trying to upload a file which is
almost 70MB (big). I have setup the timeout to a good size and file
size limit to 100MB in the server. The uploading is coming through T3
pipe. Even with all the changes, I get a 'out of memory' error. Can
someone help?

In my code, I am reading the file into a byte array. I don't think
reading the byte array has any problem.

Following is the actual exception

System.OutOfMem oryException: Exception of type
'System.OutOfMe moryException' was thrown.
at System.String.G etStringForStri ngBuilder(Strin g value, Int32
startIndex, Int32 length, Int32 capacity)
at System.Convert. ToBase64String( Byte[] inArray, Int32 offset,
Int32 length, Base64Formattin gOptions options)
at System.Convert. ToBase64String( Byte[] inArray)
at Microsoft.Web.S ervices3.Mime.X opNodeData.GetS tring()
at Microsoft.Web.S ervices3.Mime.X opContentsNode. get_Data()
at System.Xml.XmlT ext.get_Value()
at
Microsoft.Web.S ervices3.Securi ty.Xml.ElementC anonicalization Dispatcher.Writ e(XmlNode
node)
at
Microsoft.Web.S ervices3.Securi ty.Xml.ElementC anonicalization Dispatcher.Writ eElement(XmlEle ment
node)
at
Microsoft.Web.S ervices3.Securi ty.Xml.ElementC anonicalization Dispatcher.Writ e(XmlNode
node)
at
Microsoft.Web.S ervices3.Securi ty.Xml.ElementC anonicalization Dispatcher.Writ eElement(XmlEle ment
node)
at
Microsoft.Web.S ervices3.Securi ty.Xml.ElementC anonicalization Dispatcher.Writ e(XmlNode
node)
at
Microsoft.Web.S ervices3.Securi ty.Xml.ElementC anonicalization Dispatcher.Writ eElement(XmlEle ment
node)
at
Microsoft.Web.S ervices3.Securi ty.Xml.ElementC anonicalization Dispatcher.Writ e(XmlNode
node)
at
Microsoft.Web.S ervices3.Securi ty.Xml.Canonica lizationDriver. WriteTo(Canonic alEncoder
encoder)
at
Microsoft.Web.S ervices3.Securi ty.Xml.XmlDsigE xcC14NTransform .GetHashedOutpu t(HashAlgorithm
hash)
at
Microsoft.Web.S ervices3.Securi ty.TransformCha in.TransformAnd Hash(Object
inputObject, HashAlgorithm algorithm)
at
Microsoft.Web.S ervices3.Securi ty.SignatureRef erence.Calculat eHashValue(XmlD ocument
document, CanonicalXmlNod eList refList)
at
Microsoft.Web.S ervices3.Securi ty.MessageSigna ture.BuildDiges tedReferences()
at
Microsoft.Web.S ervices3.Securi ty.MessageSigna ture.ComputeKey edHashSignature (SymmetricKeyAl gorithm
key)
at
Microsoft.Web.S ervices3.Securi ty.MessageSigna ture.ComputeSig nature()
at
Microsoft.Web.S ervices3.Securi ty.Security.Ser ializeXml(SoapE nvelope
document)
at
Microsoft.Web.S ervices3.Securi ty.SecurityOutp utFilter.Proces sHeader(Securit y
security, SoapEnvelope envelope)
at
Microsoft.Web.S ervices3.Securi ty.SecurityOutp utFilter.Proces sMessage(SoapEn velope
envelope)
at
Microsoft.Web.S ervices3.Securi ty.Wse2Pipeline Policy.LegacyFi lterWrapper.Pro cessMessage(Soa pEnvelope
envelope)
at
Microsoft.Web.S ervices3.Pipeli ne.ProcessOutpu tMessage(SoapEn velope
envelope)
at Microsoft.Web.S ervices3.Xml.So apEnvelopeWrite r.Finish()
at Microsoft.Web.S ervices3.Xml.Xm lWrappingWriter .Flush()
at
System.Web.Serv ices.Protocols. SoapHttpClientP rotocol.Seriali ze(SoapClientMe ssage
message)
at
System.Web.Serv ices.Protocols. SoapHttpClientP rotocol.Invoke( String
methodName, Object[] parameters)

May 1 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
4412
by: Srijit Kumar Bhadra | last post by:
Hello, Here is some sample code with pywin32 build 203 and ctypes 0.9.6. Best regards, /Srijit File: SharedMemCreate_Mutex_win32all.py # This application should be used with SharedMemAccess_Mutex_ctypes.py or SharedMemAccess_Mutex_win32all.py
1
4369
by: Attila.Rajmund.Nohl | last post by:
Hello! I'm using KAI C++ Compiler (KCC) Version 4.0d on Sparc Solaris 8 with Sun WorkShop 6 update 2 backend (KCC compiles C++ code to C than uses the Sun compiler to produce machine executables). When I run our program under purify to check for memory errors, I get the following interesting error messages: MSE: Memory segment error: * This is occurring while in:
6
2298
by: Andrzej | last post by:
Used to read newsgroup for answers, now have to ask for them as well. I have an application (C#, .NET 1.1) that connects to local db on MSDE 2000 SP3a (using ADO from MDAC 2.71) on one side and to a web service on the other (not relevant I guess). Some stored procedures consume xml produced by DataSet objects (values as elements) using OPENXML statements. The application should be distributed among users having also Win98. Established...
25
2391
by: Zeng | last post by:
I finally narrowed down my code to this situation, quite a few (not all) of my CMyClass objects got hold up after each run of this function via the simple webpage that shows NumberEd editbox. My memory profile shows that those instances survive 3 rounds of GC collections - it's not what I expected. In my real code, CMyClass occupies big amount of memory and they all share one stance of another class that I don't have enough memory hold...
4
6021
by: Sean Shanny | last post by:
To all, Running into an out of memory error on our data warehouse server. This occurs only with our data from the 'September' section of a large fact table. The exact same query running over data from August or any prior month for that matter works fine which is why this is so weird. Note that June 2004 through today is stored in the same f_pageviews table. Nothing has changed on the server in the last couple of months. I upgraded...
2
3821
by: saran | last post by:
I am having a problem with MySQL consuming a lot of memory and eventually throwing an Out of Memory error and restarting itself. The symptoms are that swap usage continues to rise until some breaking point. The application is a typical web application w/ 2 web servers running Apache/Tomcat connecting to a dedicated DB server running only MySQL. This seems to occur as a result of running many statements in a single transaction, both...
6
4158
by: tgnelson85 | last post by:
Hello, C question here (running on Linux, though there should be no platform specific code). After reading through a few examples, and following one in a book, for linked lists i thought i would try my own small program. The problem is, I seem to be having trouble with memory, i.e. sometimes my program will work and display the correct output, and sometimes it will not and display garbage (in a printf call) so i assume i have been using...
5
24824
by: kumarmdb2 | last post by:
Hi guys, For last few days we are getting out of private memory error. We have a development environment. We tried to figure out the problem but we believe that it might be related to the OS (I am new to Windows so not sure). We are currently bouncing the instance to overcome this error. This generally happen at the end of business day only (So maybe memory might be getting used up?). We have already increased the statement heap & ...
27
2969
by: George2 | last post by:
Hello everyone, Should I delete memory pointed by pointer a if there is bad_alloc when allocating memory in memory pointed by pointer b? I am not sure whether there will be memory leak if I do not delete a. try { a = new int ;
2
3318
by: ravishi | last post by:
Well, this is my first topic at this forum and I'm a newbie on C programming too. I'm coding a little program and I've used some "dynamic arrays" on it. Compiling and running the program on Linux worked fine for me. But I was very curious to see how the program runs on Windows, so I decided to test it. Compilation was fine too, but when I run the program, I get a memorry allocation error. Here's the code: int *tspos, *tepos = NULL;...
0
10505
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10253
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9090
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7580
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6813
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5471
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5606
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4149
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2945
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.