Home > Archive > PostgreSQL JDBC > December 2005 > executeQuery hangs my application









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author executeQuery hangs my application
Stefano B.

2005-12-13, 9:23 am

Hi,

I have a problem with the PostgreSQL JDBC drivers 8.1+.

In my code I call the executeQuery method and sometimes it seems to lock my application.
I tried to update the driver to the newer 8.2 version but I obtained the same result ...

The database server version is 8.1 for Windows (but I am not the administrator)
I have found this problem (for now) only on this server ...

the jdbc log is the following:

********************
********************
*************
14:09:10.171 (2) PostgreSQL 8.2devel JDBC3 with SSL (build 500)
14:09:10.171 (2) Trying to establish a protocol version 3 connection to <_the_server_IP_>:5432
14:09:10.265 (2) FE=> StartupPacket(user=p
ostgres, database=barricalla,
client_encoding=UNIC
ODE,

DateStyle=ISO)
14:09:10.390 (2) <=BE AuthenticationReqMD5
(salt=be98c8a8)
14:09:10.390 (2) FE=> Password(md5digest=m
d5724bad3aac24aa6aed
8dfebfe9eafcfa)
14:09:10.468 (2) <=BE AuthenticationOk
14:09:10.468 (2) <=BE ParameterStatus(clie
nt_encoding = UNICODE)
14:09:10.468 (2) <=BE ParameterStatus(Date
Style = ISO, MDY)
14:09:10.468 (2) <=BE ParameterStatus(inte
ger_datetimes = off)
14:09:10.468 (2) <=BE ParameterStatus(is_s
uperuser = on)
14:09:10.468 (2) <=BE ParameterStatus(serv
er_encoding = UTF8)
14:09:10.468 (2) <=BE ParameterStatus(serv
er_version = 8.1.1)
14:09:10.468 (2) <=BE ParameterStatus(sess
ion_authorization = postgres)
14:09:10.468 (2) <=BE ParameterStatus(stan
dard_conforming_stri
ngs = off)
14:09:10.468 (2) <=BE ParameterStatus(Time
Zone = CET)
14:09:10.468 (2) <=BE BackendKeyData(pid=1
664,ckey=1388535757)

14:09:10.468 (2) <=BE ReadyForQuery(I)
14:09:10.468 (2) compatible = 8.2
14:09:10.468 (2) loglevel = 2
14:09:10.468 (2) prepare threshold = 5
getConnection returning driver[className=org.postgresql.Driver,org.postgresql.Driver@15fc672]
14:09:10.468 (2) simple execute,

handler=org.postgresql.jdbc2. AbstractJdbc2Stateme
nt$StatementResultHa
ndler@9770a3, maxRows=0, fetchSize=0,

flags=17
14:09:10.468 (2) FE=> Parse(stmt=null,quer
y="SELECT max("fulldate"),min("fulldate") FROM "data_cab_a"

",oids={})
14:09:10.484 (2) FE=> Bind(stmt=null,porta
l=null)
14:09:10.484 (2) FE=> Describe(portal=null
)
14:09:10.484 (2) FE=> Execute(portal=null,
limit=0)
14:09:10.484 (2) FE=> Sync
14:09:10.687 (2) <=BE ParseComplete [null]
14:09:10.687 (2) <=BE BindComplete [null]
14:09:10.687 (2) <=BE RowDescription(2)
14:09:10.687 (2) <=BE DataRow
14:09:10.687 (2) <=BE CommandStatus(SELECT
)
14:09:10.828 (2) <=BE ReadyForQuery(I)
14:09:11.187 (2) simple execute,

handler=org.postgresql.jdbc2. AbstractJdbc2Stateme
nt$StatementResultHa
ndler@4298e, maxRows=0, fetchSize=0,

flags=17
14:09:11.187 (2) FE=> Parse(stmt=null,quer
y="SELECT * FROM "data_cab_a" WHERE "fulldate" < timestamp

'2005-11-11 00:00:00' AND "fulldate" >= timestamp '2005-10-12 00:00:00'",oids={})
14:09:11.187 (2) FE=> Bind(stmt=null,porta
l=null)
14:09:11.187 (2) FE=> Describe(portal=null
)
14:09:11.187 (2) FE=> Execute(portal=null,
limit=0)
14:09:11.187 (2) FE=> Sync
14:09:11.578 (2) <=BE ParseComplete [null]
14:09:11.578 (2) <=BE BindComplete [null]
14:09:11.578 (2) <=BE RowDescription(13)
14:09:11.578 (2) <=BE DataRow
14:09:11.578 (2) <=BE DataRow
14:09:11.578 (2) <=BE DataRow
14:09:11.593 (2) <=BE DataRow
14:09:11.593 (2) <=BE DataRow
14:09:11.593 (2) <=BE DataRow
14:09:11.593 (2) <=BE DataRow
14:09:11.593 (2) <=BE DataRow

....
....
.... other ~5000 lines
....
....


14:10:06.109 (2) <=BE CommandStatus(SELECT
)
14:10:06.109 (2) <=BE ReadyForQuery(I)

14:10:42.515 (2) simple execute,

handler=org.postgresql.jdbc2. AbstractJdbc2Stateme
nt$StatementResultHa
ndler@11ed166, maxRows=0,

fetchSize=0, flags=17
14:10:42.515 (2) FE=> Parse(stmt=null,quer
y="SELECT * FROM "data_cab_a" WHERE "fulldate" < timestamp

'2005-12-11 00:00:00' AND "fulldate" >= timestamp '2005-11-11 00:00:00'",oids={})
14:10:42.515 (2) FE=> Bind(stmt=null,porta
l=null)
14:10:42.515 (2) FE=> Describe(portal=null
)
14:10:42.515 (2) FE=> Execute(portal=null,
limit=0)
14:10:42.515 (2) FE=> Sync
14:10:42.859 (2) <=BE ParseComplete [null]
14:10:42.859 (2) <=BE BindComplete [null]
14:10:42.859 (2) <=BE RowDescription(13)
14:10:42.859 (2) <=BE DataRow
14:10:42.859 (2) <=BE DataRow
14:10:42.859 (2) <=BE DataRow
14:10:42.859 (2) <=BE DataRow

....
.... other ~5000 lines
....

14:11:21.140 (2) <=BE DataRow
14:11:21.140 (2) <=BE DataRow
14:11:21.140 (2) <=BE DataRow
14:11:21.140 (2) <=BE DataRow
14:11:21.140 (2) <=BE DataRow
14:11:21.140 (2) <=BE DataRow
********************
********************
********************
******************

at this point no other log messages are printed and the application seems locked on the executeQuery method.
The database connection is opened (even if I wait for 2 or 3 hours ...)

Any hints?
Thanks in advance.

Stefano




Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com