Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS 2015 MVC OutOfMemoryException

Trying to debug an MVC5 web app - quite basic. I've read articles and SO questions and answers and tried things until I'm blue in the face, and still can't figure out why I'm getting this error.

Exception of type 'System.OutOfMemoryException' was thrown.

An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Environment: - VS 2015 - Windows 10 Professional N - IISExpress - MVC5 Web Application

I used VS 2013 up until about two weeks ago, switched to 2015 after an upgrade to Windows 10. I've never seen this until switching to 2015. The project(s) are hardly large and memory consuming, the database probably has a dozen tables with two dozen rows in it, and it's not even this single project (this just happens to be my most active one at the moment).

I've done the following:

  • Verified no spikes in machine resources when this occurs (CPU < 10%, 14gb memory, pretty much flatlined at 6.7gb usage when trying start the debugging (same as normal when I'm not trying to start, no spikes at all))
  • Played with debug settings sufficient to ensure that IISExpress doesn't stay running in the background after I close the session/stop debugging.
  • Put IISExpress on the system try where I can manually stop application and close it
  • Verified that there's no hanging processes of iisexpress continuing to run3
  • Cleared out every temp folder and every other trick I've read about

Yet, every three or four times I hit F5 to start debugging, I get this error. Sometimes I can see IISExpress running, kill it and retry and it works fine. Sometimes the only thing that works is restarting Visual Studio.

I go through runs where I have to restart VS every other time I want to debug the application. This is insane, and I can't find the slightest trace of a cause.

I'm at my wits end, enough to the point where I'm thinking this has to be a bug with VS2015, possibly when running on Windows 10 Professional (N)?

Anyone? Please?!?! (can provide full stack trace if someone thinks it helpful)

like image 653
jleach Avatar asked Feb 21 '16 03:02

jleach


1 Answers

try this link and others in the comment these will help to you.

link one :http://weblogs.asp.net/morteza/OutOfMemoryException

Specifically, setting the option to use 64 bit version of IIS:

Tools -> Options -> Projects and Solutions -> Web Projects, top checkbox. Make sure it's checked.

enter image description here

and try these links also link one, link two

like image 197
Chanaka Anuradh Caldera Avatar answered Sep 22 '22 14:09

Chanaka Anuradh Caldera