Remove a SPID after LINQ in Entity Framework -


i have application use entity framework interact ms sql database. in make calls dbcontext inside using blocks. problem i'm having that, after dbcontext has been disposed of, spid sits there status of sleeping until application exits. how remove these hanging spids?

you don't want to, should work:

((sqlconnection)dbcontext.database.connection).clearallpools(); 

as mentioned above, can , negatively impact performance of application (and perhaps other applications). perhaps real question might be, why want remove spid?

you add pooling=false connection string should prevent application using connection pool @ all. depending on application, may or may not affect performance greatly.


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -