I am getting the below error message when click on Export button, This button click event will get list of records from DB and will bind to an hidden gridview and finally export this gridview records to excel.
And am not getting this error at all time, very rare.
Exception of type 'System.OutOfMemeoryException' was thrown
Looks like not enough memory available to complete the process. You can try monitoring the RAM availability in that server and also check the Memory limit in AppPool of that website.
Hope this helps.
Please "Mark as Answer" if this post answers your question.
this error occures when the memory in heap is no longer available for allocating objects memory. you need to optimize your code to make it work, or need to check your RAM or web server resources, I would strongly recommend to optimize your code.
Ashutosh Pathak
Blog: http://catchcode.blogspot.com Please mark it as answer if it helps, as clicking on the button can save time of others :)
MCP,MCAD,MCSD,MCTS
Thanks, I just killed w3wp.exe process via task manager in application server and now fine. How can I prevent it in furture? why this is happening?
Any ideas would be appreaciable!!!
ASP .NET applications will throw a System.OutOfMemoryException error if they cannot allocate physical memory or reserve sufficient virtual memory to meet an allocation request. By default, the addressable virtual memory space that is available is 2 GB. If
this is used, the operating system can't allocate additional memory.
This can also occur if other processes on the server are using most of the ram.
Thanks, I just killed w3wp.exe process via task manager in application server and now fine. How can I prevent it in furture? why this is happening?
Any ideas would be appreaciable!!!
ASP .NET applications will throw a System.OutOfMemoryException error if they cannot allocate physical memory or reserve sufficient virtual memory to meet an allocation request. By default, the addressable virtual memory space that is available is 2 GB. If
this is used, the operating system can't allocate additional memory.
This can also occur if other processes on the server are using most of the ram.
g_mani
Contributor
2055 Points
586 Posts
Out of Memory Exception
Dec 04, 2012 04:39 AM|LINK
I am getting the below error message when click on Export button, This button click event will get list of records from DB and will bind to an hidden gridview and finally export this gridview records to excel.
And am not getting this error at all time, very rare.
Exception of type 'System.OutOfMemeoryException' was thrown
Please Mark as Answer If this is helpful.
ferrymeidian...
Member
500 Points
126 Posts
Re: Out of Memory Exception
Dec 04, 2012 04:45 AM|LINK
Looks like not enough memory available to complete the process. You can try monitoring the RAM availability in that server and also check the Memory limit in AppPool of that website.
Hope this helps.
Regards,
Ferry Meidianto
www.meidianto.com
Ashutosh Pat...
Contributor
5737 Points
1105 Posts
Re: Out of Memory Exception
Dec 04, 2012 04:48 AM|LINK
hi g_mani,
this error occures when the memory in heap is no longer available for allocating objects memory. you need to optimize your code to make it work, or need to check your RAM or web server resources, I would strongly recommend to optimize your code.
Blog: http://catchcode.blogspot.com
Please mark it as answer if it helps, as clicking on the button can save time of others :)
MCP,MCAD,MCSD,MCTS
g_mani
Contributor
2055 Points
586 Posts
Re: Out of Memory Exception
Dec 04, 2012 05:43 AM|LINK
Thanks, I just killed w3wp.exe process via task manager in application server and now fine. How can I prevent it in furture? why this is happening?
Any ideas would be appreaciable!!!
Please Mark as Answer If this is helpful.
oned_gk
All-Star
31375 Points
6413 Posts
Re: Out of Memory Exception
Dec 04, 2012 05:53 AM|LINK
try this
gv.visible="true"
----export
gv.visible="false"
Is your data too large?
geniusvishal
Star
14076 Points
2794 Posts
Re: Out of Memory Exception
Dec 04, 2012 05:56 AM|LINK
ASP .NET applications will throw a System.OutOfMemoryException error if they cannot allocate physical memory or reserve sufficient virtual memory to meet an allocation request. By default, the addressable virtual memory space that is available is 2 GB. If this is used, the operating system can't allocate additional memory.
This can also occur if other processes on the server are using most of the ram.
http://support.thycotic.com/KB/a230/troubleshooting-systemoutofmemoryexception.aspx
http://support.microsoft.com/kb/909678
http://www.file.net/process/w3wp.exe.html
My Website
www.dotnetvishal.com
g_mani
Contributor
2055 Points
586 Posts
Re: Out of Memory Exception
Dec 04, 2012 06:28 AM|LINK
just 5000 records
Please Mark as Answer If this is helpful.
g_mani
Contributor
2055 Points
586 Posts
Re: Out of Memory Exception
Dec 04, 2012 06:29 AM|LINK
Many Thanks!!!
How can we prevent it, need to increase anything?
Please Mark as Answer If this is helpful.
ferrymeidian...
Member
500 Points
126 Posts
Re: Out of Memory Exception
Dec 04, 2012 06:45 AM|LINK
By optimizing your code. Dispose the object as soon as it's not needed.
Another alternative is adding RAM to your server.
Regards,
Ferry Meidianto
www.meidianto.com