Random errors occur with per-request DbContext
问题 I'm experiencing random errors (several per day) in my mvc+ef+unity application under higher load (10+ request per sec): The connection was not closed / The connection's current state is connecting deadlocks on Count queries (no explicit transaction) An item with the same key has already been added. in System.Data.Entity.DbContext.SetTEntity while resolving DbContext The remote host closed the connection. The error code is 0x80070057 There is already an open DataReader associated with this