Postgresql Queries not returning from server when running on a VM and DB server has high CPU load
Posted: Fri 12 Apr 2013 16:53
When running my application inside a VM and connecting a database server with high CPU my application hangs because the query does not timeout properly. I have my datacontexts command timeout set to 60 seconds. The same applicatuion works properly when running on my desktop. Both the desktop and the VM are running Windows 7 64-bit.
I am running the following versions of devart libraries.
Devart.data.dll 5.0.581.0
Devart.data.Linq.dll 4.1.127
Devart.Data.PostgreSql.dll 6.2.122.0
Devart.Data.PostgreSql.Linq.dll 4.1.127.0
When this behavior happens I am getting the following errors in the database server logs.
2013-04-12 12:40:31.353 SDT 3530 Jarom 23008: LOG: could not send data to client: Broken pipe
2013-04-12 12:40:31.354 SDT 3530 Jarom 23008: STATEMENT: SELECT t1.connection_id, t1.tag_id, t1.enable, t1.point_type_id, t1.deadband, t1.zero_deadband, t1.real_range_min, t1.real_range_max, t1.real_range_l
FROM list_gvl_tags_for_hmi() t1
2013-04-12 12:40:31.366 SDT 3530 Jarom 23008: LOG: duration: 273578.100 ms
2013-04-12 12:40:31.366 SDT 3530 Jarom 23008: LOG: SSL error: bad write retry
2013-04-12 12:40:31.367 SDT 3530 Jarom 23008: LOG: could not send data to client: Connection reset by peer
2013-04-12 12:40:31.549 SDT 3530 Jarom 23008: LOG: SSL error: bad write retry
However if switch out my drivers and use Npgsql driver the queries do time out properly and the postgresql log has the following error.
2013-04-12 11:30:39.671 SDT 3530 Jarom 16755: ERROR: canceling statement due to user request
2013-04-12 11:30:39.672 SDT 3530 Jarom 16755: CONTEXT: SQL statement "SELECT schema_12.raw_tag_name(t.connection_id, r.name, p.protocol_name, rc.instance, t.partial_raw_tag) FROM schema_12.tags t LEFT JOIN
PL/pgSQL function "raw_tag_name" line 2 at SQL statement
PL/pgSQL function "list_gvl_tags_for_hmi" line 7 at FOR over SELECT rows
2013-04-12 11:30:39.672 SDT 3530 Jarom 16755: STATEMENT: select * from schema_12.list_gvl_tags_for_hmi()
Any suggestion would be great. I really want to be able to use linq queries of this.
I am running the following versions of devart libraries.
Devart.data.dll 5.0.581.0
Devart.data.Linq.dll 4.1.127
Devart.Data.PostgreSql.dll 6.2.122.0
Devart.Data.PostgreSql.Linq.dll 4.1.127.0
When this behavior happens I am getting the following errors in the database server logs.
2013-04-12 12:40:31.353 SDT 3530 Jarom 23008: LOG: could not send data to client: Broken pipe
2013-04-12 12:40:31.354 SDT 3530 Jarom 23008: STATEMENT: SELECT t1.connection_id, t1.tag_id, t1.enable, t1.point_type_id, t1.deadband, t1.zero_deadband, t1.real_range_min, t1.real_range_max, t1.real_range_l
FROM list_gvl_tags_for_hmi() t1
2013-04-12 12:40:31.366 SDT 3530 Jarom 23008: LOG: duration: 273578.100 ms
2013-04-12 12:40:31.366 SDT 3530 Jarom 23008: LOG: SSL error: bad write retry
2013-04-12 12:40:31.367 SDT 3530 Jarom 23008: LOG: could not send data to client: Connection reset by peer
2013-04-12 12:40:31.549 SDT 3530 Jarom 23008: LOG: SSL error: bad write retry
However if switch out my drivers and use Npgsql driver the queries do time out properly and the postgresql log has the following error.
2013-04-12 11:30:39.671 SDT 3530 Jarom 16755: ERROR: canceling statement due to user request
2013-04-12 11:30:39.672 SDT 3530 Jarom 16755: CONTEXT: SQL statement "SELECT schema_12.raw_tag_name(t.connection_id, r.name, p.protocol_name, rc.instance, t.partial_raw_tag) FROM schema_12.tags t LEFT JOIN
PL/pgSQL function "raw_tag_name" line 2 at SQL statement
PL/pgSQL function "list_gvl_tags_for_hmi" line 7 at FOR over SELECT rows
2013-04-12 11:30:39.672 SDT 3530 Jarom 16755: STATEMENT: select * from schema_12.list_gvl_tags_for_hmi()
Any suggestion would be great. I really want to be able to use linq queries of this.