Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OutOfMemory and StringBuilder
Message
From
13/01/2013 02:33:37
 
 
To
13/01/2013 00:14:08
General information
Forum:
ASP.NET
Category:
Troubleshooting
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01562245
Message ID:
01562347
Views:
21
>>Bear in mind that an OutOfMemoryException is thrown when a *request for memory* cannot be fulfilled. If you have 900Mb available and try to add a 1Gb string then you will get an exception. But that is not, in itself, fatal to the app - you still have 900Mb available and the process can continue to run. Whether you can safely handle an OOMException depends on the circumstances.
>
>What we had that situation, many errors like that came in. In some of them, they halted on the StrTran() method. On those, only a small string was sent. Well, small, in terms that this was a SQL command being parsed for verifications to encapsulated SQL Server reserved words with []. But, the one that triggered it was about 400 characters at most.

Those 400 bytes would be the ones that broke the camel's back. I'm guessing that the exception was caught at a much higher level in the stack - by which point GC would be able to free up sufficient memory to continue execution.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform