Hashtable insert failed. Load factor too high. - ASP.NET 2.0
Asked Answered
W

3

6

I received the following error while trying to login to a secured directory. As far as I know there are no large hashtables in use. The user login information is in the web.config file. Notice this is happening in .NET 2.0. I've searched and found references to this occurring in .net 1.0 or 1.1 environments but I haven't found a solution for it happening in 2.0+.

I need to figure out why this happened so I can avoid it in the future. I could just reset the server and maybe it goes away but I would prefer to understand why it happened.

Here is the entire error page as shown:

Server Error in '/' Application.

Hashtable insert failed. Load factor too high.

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.InvalidOperationException: Hashtable insert failed. Load factor too high.

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:

[InvalidOperationException: Hashtable insert failed. Load factor too high.] System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add) +2903977 System.Collections.Hashtable.set_Item(Object key, Object value) +11
System.ComponentModel.ReflectTypeDescriptionProvider.ReflectGetAttributes(Type type) +323
System.ComponentModel.ReflectedTypeData.GetAttributes() +36 System.ComponentModel.DefaultTypeDescriptor.System.ComponentModel.ICustomTypeDescriptor.GetAttributes() +50 System.ComponentModel.TypeDescriptor.GetAttributes(Type componentType) +26
System.Web.UI.ThemeableAttribute.IsTypeThemeable(Type type) +98
System.Web.UI.Control.ApplySkin(Page page) +49
System.Web.UI.Control.InitRecursive(Control namingContainer) +2120286
System.Web.UI.Control.InitRecursive(Control namingContainer) +198
System.Web.UI.Control.InitRecursive(Control namingContainer) +198
System.Web.UI.Control.InitRecursive(Control namingContainer) +198
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +834

Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433

Wantage answered 2/2, 2009 at 22:54 Comment(1)
Did you ever figure out how this happened? Our site just got hit with this but i have no idea how to reproduce it. If it can be reproduced then I would know if the hotfix described below actually fixes it. Thx.Islamite
H
5

The following hotfix addresses this (and other) issues.

http://support.microsoft.com/?id=927579

(information sourced from here)

Hydrastine answered 2/2, 2009 at 23:2 Comment(5)
i found that one on my search but wasn't sure it was the correct fix. did you encounter this issue and use this hotfix?Wantage
I have run into this before. I found the same link, and it seemed to resolve it. At least, it never came back... That's not necessarily the same as resolving it :) YMMVHydrastine
thanks for the update! it seems to only be affecting the admin pages which require a membership provider login. the main public pages are not affected...Wantage
how do you get the fix? do I have to start a paid support ticket just to get a file?Wantage
No. You can just request it. As far as I know it should be free for a hotfix. I had to go through 'channels' where I am in order to get it, so I don't know whether our server support team had to raise an incident. I just told 'em how to fix it :)Hydrastine
H
2

In .NET 4.0, this same bug reappeared; it was fixed in a hotfix with KB:2576011. It may now be rolled up into standard updates (haven't checked), but: a hotfix for 4.0 is available from MS if needed.

Hydrogenolysis answered 15/3, 2012 at 13:19 Comment(1)
I've just experienced this issue in Microsoft Dynamics CRM Email Router which must use hashtables across multiple threads internally for processing mail.Iconium
M
0

I've had a similar issue, outlined here: HashTable Insert Failed. Load Factor Too High. .NET 2.0 SP2

However, the 927579 hotfix was included in .NET 2.0 SP1 ( http://support.microsoft.com/kb/945757 ) and we still got the same issue as listed above. Hopefully the newer hotfix ( http://code.msdn.microsoft.com/KB968432 ) will resolve it once and for all.

I can't vouch for it as I haven't had chance to install it on our server yet, and considering we haven't had a recurrence of the problem after the last time then even if it had been installed I wouldn't be able to say whether it works or not!

Miltonmilty answered 1/2, 2010 at 12:45 Comment(1)
968432 killed our .net installation and we ended up having to completely reinstall .net. That's not to say that it won't work for someone else, but be aware that it may require more than 5 minutes of support!Miltonmilty

© 2022 - 2024 — McMap. All rights reserved.