tags:

views:

84

answers:

2

Hi folks:

Our production repeatedly met "Hashtable insert failed. Load factor too high". 1. How could I simulate this kind of exception? 2. If this sort of exception is thrown, would the existing key/value will disappear?

Thanks for any help.

+1  A: 

In .NET 2.0, this error is almost always caused by multiple threads modifying the Hashtable at the same time.

There is a HotFix for .NET 3.5

See Hashtable insert failed. Load factor too high and FIX: "InvalidOperationException, Load Factor Too High" When You Use a Hashtable Collection

Mitch Wheat
Why the blog mentioned KB 927579? Isn't it 968432?
Ricky
Our sys admins indicated 968432 is installed, but the error seemed still existing.
Ricky
BTW: we are using .NET 2.0 on Win2003
Ricky
+2  A: 

This contains a relevant explanation: http://blogs.msdn.com/toddca/archive/2007/01/26/hashtable-insert-failed-load-factor-too-high.aspx

Woot4Moo
that's the link I linked to...
Mitch Wheat
You must have been editing while I was answering :)
Woot4Moo
Why the blog mentioned KB 927579? Isn't it 968432?
Ricky
I don't know I didn't write the blog
Woot4Moo