
Hopefully someone will find below useful.ĪWS Lambda purges idle connections over time ( AWS docs). Our team encountered the exact same problem, and I delved a bit deeper.
Aws postgresql connection timed out how to#
What Im asking is some guidance on how to debug the issue Now I have time, test stand and strong wish to fix the issue. I do saw the same tickets here previously but all of them were closed for some reasons without any solution.And there is should be some considerable delay between requests to reproduce it The issue does not happen during lambda cold start.I have two completely different projects the second one is using postgres 11.x (don't remember the minor version) and it is experiencing the same issue.So this is not our AWS setup/lambda issue. The same app with mysql is working fine.05:49:00 not receive data from client: Connection reset by peer

End of stack trace from previous location where exception was thrown -Īt _Displa圜lass160_0.g_ReadMessageLong|0>d.MoveNext()Īt (Boolean async, Boolean isConsuming)Īt (CommandBehavior behavior, Boolean async, CancellationToken cancellationToken)Īt (CommandBehavior behavior)Īt (CommandBehavior behavior)Īt .ExecuteReader()Īt .ExecuteReader(RelationalCommandParameterObject parameterObject)Īt .QueryingEnumerable`1.Enumerator.InitializeReader(DbContext _, Boolean result)Īt .(TState state, Func`3 operation, Func`3 verifySucceeded)Īt .QueryingEnumerable`1.Enumerator.MoveNext() End of inner exception stack trace -Īt _Displa圜lass30_0.g_EnsureLong|0>d.MoveNext() > (104): Connection reset by peerĪt .Read(Byte buffer, Int32 offset, Int32 size) > System.IO.IOException: Unable to read data from the transport connection: Connection reset by peer. > Npgsql.NpgsqlException (0x80004005): Exception while reading from stream System.InvalidOperationException: An exception has been raised that is likely due to a transient failure. SELECT COUNT(*)::INT FROM some_table AS l WHERE some_table.name = : An exception occurred while iterating over the results of a query for context type ''. SELECT COUNT(*)::INT FROM some_table AS l WHERE some_table.name = : Failed executing DbCommand CommandType='Text', CommandTimeout='30'] : Failed executing DbCommand CommandType='Text', CommandTimeout='30']
