postgresql - Socket receive hangs in .NET 4.5 under windows 2012 -
we have web application built around nhibernate , npgsql provider, has been working fine on server 2008 r2 , .net 4. have upgraded server 2012 , 4.5 stack, , experiencing weird hangs in database layer.
we have threads freeze forever on test server (virtual instance of server 2012), , hangs approx 7.5 or 15 minutes (450 sec or 900 sec, approx) on production servers (i know because tell in logs).
when manage reproduce on testservice, , attach debugger, see 1 thread in following state:
[managed native transition] system.dll!system.net.sockets.socket.receive(byte[] buffer, int offset, int size, system.net.sockets.socketflags socketflags, out system.net.sockets.socketerror errorcode) system.dll!system.net.sockets.networkstream.read(byte[] buffer, int offset, int size) mscorlib.dll!system.io.bufferedstream.readbyte() npgsql.dll!npgsql.npgsqlstate.processbackendresponses_ver_3.movenext() npgsql.dll!npgsql.forwardsonlydatareader.getnextresponseobject() npgsql.dll!npgsql.forwardsonlydatareader.getnextrowdescription() npgsql.dll!npgsql.forwardsonlydatareader.nextresult() npgsql.dll!npgsql.forwardsonlydatareader.forwardsonlydatareader(system.collections.generic.ienumerable<npgsql.iserverresponseobject> dataenumeration, system.data.commandbehavior behavior, npgsql.npgsqlcommand command, npgsql.npgsqlconnector.notificationthreadblock threadblock, bool synchonreaderror) npgsql.dll!npgsql.npgsqlcommand.getreader(system.data.commandbehavior cb) npgsql.dll!npgsql.npgsqlcommand.executeblind() npgsql.dll!npgsql.npgsqltransaction.rollback() nhibernate.dll!nhibernate.transaction.adotransaction.rollback()
in postgres end, see running query, guess because transaction never rollbacked. using npgsql v2.0.12 (the latest stable).
what cause hang, , extremely long timeout (or lack of timeout in test)? , why differ on different os?
we did run on server 2008 r2 .net 4.5 on 1 server before, , never saw behavior either. assume since native call, os dependent?
does has theory why happen?
things check in order:
locks on server side.
network interruption , timeout.
responsiveness on server.
long-running queries.
Comments
Post a Comment