Devart 커넥터가있는 Entity Framework에서 생성 한 SQL (PostgreSQL) 쿼리 중 하나에 문제가 있습니다. 정확히 60초 (마다) 후, 나는 오류 얻을 : 내가 연결 문자열에서 타임 아웃을 실험하려응용 프로그램에서 PosgreSQL 쿼리 (EF + Devart)가 실패하지만 PgAdmin에서 작동합니다.
System.Data.Entity.Core.EntityCommandExecutionException: An error occurred while executing the command definition. See the inner exception for details. ---> Devart.Data.PostgreSql.PgSqlException: Read failure ---> System.IO.IOException: Read failure ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond at System.Net.Sockets.Socket.Receive (System.Byte[] buffer, Int32 offset, Int32 size, SocketFlags flags) [0x00000] in :0 at System.Net.Sockets.NetworkStream.Read (System.Byte[] buffer, Int32 offset, Int32 size) [0x00000] in :0 --- End of inner exception stack trace --- at System.Net.Sockets.NetworkStream.Read (System.Byte[] buffer, Int32 offset, Int32 size) [0x00000] in :0 at Devart.Common.au.a (System.Byte[] A_0, Int32 A_1, Int32 A_2) [0x00000] in :0 --- End of inner exception stack trace --- at Devart.Data.PostgreSql.aa.d (System.Exception A_0) [0x00000] in :0 at Devart.Common.z.d (System.Byte[] A_0, Int32 A_1, Int32 A_2) [0x00000] in :0 at Devart.Common.ae.a (System.Byte[] A_0, Int32 A_1, Int32 A_2) [0x00000] in :0 at Devart.Data.PostgreSql.x.c (System.Byte[] A_0, Int32 A_1, Int32 A_2) [0x00000] in :0 at Devart.Data.PostgreSql.x.f() [0x00000] in :0 at Devart.Data.PostgreSql.ai.a (Boolean A_0, Boolean A_1, Char A_2, Boolean A_3) [0x00000] in :0 at Devart.Data.PostgreSql.ai.b (Boolean A_0, Boolean A_1) [0x00000] in :0 at Devart.Data.PostgreSql.ai.c (Boolean A_0) [0x00000] in :0 at Devart.Data.PostgreSql.ae.b (Boolean A_0) [0x00000] in :0 at Devart.Data.PostgreSql.ae.g (Devart.Data.PostgreSql.ac A_0) [0x00000] in :0 at Devart.Data.PostgreSql.ae.b (Devart.Data.PostgreSql.ac A_0) [0x00000] in :0 at Devart.Data.PostgreSql.ac.af() [0x00000] in :0 at Devart.Data.PostgreSql.PgSqlDataReader.f (Int32 A_0) [0x00000] in :0 --- End of inner exception stack trace --- at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands (System.Data.Entity.Core.EntityClient.EntityCommand entityCommand, CommandBehavior behavior) [0x00000] in :0 at System.Data.Entity.Core.Objects.Internal.ObjectQueryExecutionPlan.Execute[LisExaminationRequest] (System.Data.Entity.Core.Objects.ObjectContext context, System.Data.Entity.Core.Objects.ObjectParameterCollection parameterValues) [0x00000] in :0 [ERROR] FATAL UNHANDLED EXCEPTION: System.Data.Entity.Core.EntityCommandExecutionException: An error occurred while executing the command definition. See the inner exception for details. ---> Devart.Data.PostgreSql.PgSqlException: Read failure ---> System.IO.IOException: Read failure ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond at System.Net.Sockets.Socket.Receive (System.Byte[] buffer, Int32 offset, Int32 size, SocketFlags flags) [0x00000] in :0 at System.Net.Sockets.NetworkStream.Read (System.Byte[] buffer, Int32 offset, Int32 size) [0x00000] in :0 --- End of inner exception stack trace --- at System.Net.Sockets.NetworkStream.Read (System.Byte[] buffer, Int32 offset, Int32 size) [0x00000] in :0 at Devart.Common.au.a (System.Byte[] A_0, Int32 A_1, Int32 A_2) [0x00000] in :0 --- End of inner exception stack trace --- at Devart.Data.PostgreSql.aa.d (System.Exception A_0) [0x00000] in :0 at Devart.Common.z.d (System.Byte[] A_0, Int32 A_1, Int32 A_2) [0x00000] in :0 at Devart.Common.ae.a (System.Byte[] A_0, Int32 A_1, Int32 A_2) [0x00000] in :0 at Devart.Data.PostgreSql.x.c (System.Byte[] A_0, Int32 A_1, Int32 A_2) [0x00000] in :0 at Devart.Data.PostgreSql.x.f() [0x00000] in :0 at Devart.Data.PostgreSql.ai.a (Boolean A_0, Boolean A_1, Char A_2, Boolean A_3) [0x00000] in :0 at Devart.Data.PostgreSql.ai.b (Boolean A_0, Boolean A_1) [0x00000] in :0 at Devart.Data.PostgreSql.ai.c (Boolean A_0) [0x00000] in :0 at Devart.Data.PostgreSql.ae.b (Boolean A_0) [0x00000] in :0 at Devart.Data.PostgreSql.ae.g (Devart.Data.PostgreSql.ac A_0) [0x00000] in :0 at Devart.Data.PostgreSql.ae.b (Devart.Data.PostgreSql.ac A_0) [0x00000] in :0 at Devart.Data.PostgreSql.ac.af() [0x00000] in :0 at Devart.Data.PostgreSql.PgSqlDataReader.f (Int32 A_0) [0x00000] in :0 --- End of inner exception stack trace --- at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands (System.Data.Entity.Core.EntityClient.EntityCommand entityCommand, CommandBehavior behavior) [0x00000] in :0 at System.Data.Entity.Core.Objects.Internal.ObjectQueryExecutionPlan.Execute[LisExaminationRequest] (System.Data.Entity.Core.Objects.ObjectContext context, System.Data.Entity.Core.Objects.ObjectParameterCollection parameterValues) [0x00000] in :0
을하지만, 도움이되지 않았다. 이것은 (EF
에 의해 생성) DbContext.DataBase.Connection.ConnectionString
User Id=myuser;Host=myhost;Port=5432;Database=mydatabase;Unicode=True;Connection Timeout=300;Default Command Timeout=300;SSLMode=Disable;
이 쿼리는 매우 큰의 내용이다. 그것은 6500 줄 이상의 코드 (결과가없는 query
)를 가지고 있으며 수많은 UNION
문장으로 구성됩니다.
약 120 초에 실행 된 PgAdmin
에서 동일한 쿼리가 수동으로 실행되었습니다.
아이디어가 있으십니까?
연결이 제대로 설정되지 않았습니다. 해당 자격 증명을 사용하여 해당 서버에서 연결할 수 있는지 확인하십시오. –
@JakubKania 연결이 설정되었습니다. 다른 쿼리는 정상적으로 작동합니다. – gisek
그런 경우'SELECT pg_sleep (120)'과 같이 수동으로 연결 시간 초과를 시도하고 오류가 같은지보십시오. –