Exception of type 'System.OutOfMemoryException' was thrown.

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
2/13/2011 11:15:18 AM
Gravatar
Total Posts 160
mojoPortal Community Expert
Designer of over 25 unique and custom mojoPortal sites with DMSQD and sister company, The Design Loft - www.dmsqd.com

Exception of type 'System.OutOfMemoryException' was thrown.

Hi guys

Honestly, I'm not sure whether this is the right forum for this so forgive me if not.

We're having a few issues with a few recent mojoPortal installs and it's all the same problem across the board. We're running 2.3.6.1 on Medium Trust and have a problem where the site won't skin unless CSS caching is disabled in the Advanced Tools section of Admin.

Once we disable it, it renders the skin great.

We've got the theme.skin file from the skin in the App_Themes / default folder, are running the medium trust web.config file and the issue occurs when I try and use any skin, not just the one we've developed.

Every now and then, we also get the

Exception of type 'System.OutOfMemoryException' was thrown.

error popping up.

Any ideas please?

As I'm writing this I'm testing all of our sites out, and the ones that were previously down (not rendering) are working fine now. It did this last week too so I winder, do you think it could be a server issue? And if so, what would likely cause it do you think?

Thanks

Mark

2/13/2011 12:11:08 PM
Gravatar
Total Posts 18439

Re: Exception of type 'System.OutOfMemoryException' was thrown.

That setting under Advanced Tools only sets a cookie so it only affects you, you would have to disable it from web.config to disable it for everyone, otherwise others might be getting an error or no css even though it works for you.

I would enable caching and check it with firebug to see what is going wrong, is the css url returning css or getting an error or something.

That error about out of memory can happen in cheap hosting if they don't give you enough memory and it can lead to poor performance if it causes the app to recycle frequently which typically happens whenever the memory limit is reached. Also if you have any custom features you need to be careful in developing them that they don't consume too much memory or have coding errors that cause a memory leak. However unless that error is happening right at the time when the css is not working it is probably not related.

Hope it helps,

Joe

2/13/2011 1:48:28 PM
Gravatar
Total Posts 160
mojoPortal Community Expert
Designer of over 25 unique and custom mojoPortal sites with DMSQD and sister company, The Design Loft - www.dmsqd.com

Re: Exception of type 'System.OutOfMemoryException' was thrown.

Hi Joe

Thanks for that - I was aware of the caching being set by a cookie so it was that which concerned me, couldn't turn it off for everyone.

Weirdly, now it's working across all machines that I've tested on, it seems so sporadic. When it happens again I'll check the CSS bits that you mention in your response.

I take your point about the hosting too however, other that it being medium trust, the hosting has always been very good and reliable and is from a reputable UK company. I've submitted a ticket to them just to see if they've made any changes etc that we aren't aware of. We tend to use another host for our full trust sites on clients that will need it and haven't had it with them though so maybe there is something in that.

As ever, thanks for the advice, I'll feedback any further developments.

Thanks

Mark

2/13/2011 1:52:16 PM
Gravatar
Total Posts 160
mojoPortal Community Expert
Designer of over 25 unique and custom mojoPortal sites with DMSQD and sister company, The Design Loft - www.dmsqd.com

Re: Exception of type 'System.OutOfMemoryException' was thrown.

Oh, re caching the css for everyone, I meant without using web.config...

2/14/2011 1:31:11 PM
Gravatar
Total Posts 2239

Re: Exception of type 'System.OutOfMemoryException' was thrown.

Hi all,

I checked out a couple of the sites in question and FireBug shows that the browser returns "Failed to load source..." for sites with customErrors turned ON and the actual .NET error page for the System.OutOfMemoryException error for sites with customErrors turned OFF.

Also, the error is ocurring on 2.3.5.5 installs as well as 2.3.6.1, all medium trust.

I think it is a server related issue because in the amount of time it took me to type the preceding paragraph, the issue stopped on one of the sites.

Thanks,
Joe D.

7/17/2012 5:50:28 AM
Gravatar
Total Posts 1

Re: Exception of type 'System.OutOfMemoryException' was thrown.

Exception of type 'System.OutOfMemoryException' was thrown.
Description: 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.

Exception Details: System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.]
   System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
   System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +43
   System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +127
   System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +142
   System.Reflection.Assembly.Load(String assemblyString) +28
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +46

[ConfigurationErrorsException: Exception of type 'System.OutOfMemoryException' was thrown.]
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +613
   System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +203
   System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +105
   System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +178
   System.Web.Compilation.BuildProvidersCompiler..ctor(VirtualPath configPath, Boolean supportLocalization, String outputAssemblyName) +54
   System.Web.Compilation.CodeDirectoryCompiler.GetCodeDirectoryAssembly(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories, Boolean isDirectoryAllowed) +600
   System.Web.Compilation.BuildManager.CompileCodeDirectory(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories) +125
   System.Web.Compilation.BuildManager.CompileResourcesDirectory() +31
   System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +304

[HttpException (0x80004005): Exception of type 'System.OutOfMemoryException' was thrown.]
   System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +58
   System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +512
   System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters) +729

[HttpException (0x80004005): Exception of type 'System.OutOfMemoryException' was thrown.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +8901019
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +85
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +333

 

Hi Joe Audette,

I have the same problem.

My website is operating normally. I edited on localhost after that I upload to hosting. My website is failed.

Can you help me resolve this problem? 

 

7/17/2012 9:12:50 AM
Gravatar
Total Posts 18439

Re: Exception of type 'System.OutOfMemoryException' was thrown.

You need better hosting that provides more server memory

You must sign in to post in the forums. This thread is closed to new posts.