Unix Technical Forum

Write to outputstream in PGStream blocks indefinitely

This is a discussion on Write to outputstream in PGStream blocks indefinitely within the pgsql Interfaces jdbc forums, part of the PostgreSQL category; --> I am having a problem where by my application freezes after a period of time under load. Doing a ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Interfaces jdbc

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-15-2008, 11:23 PM
Jonas Partner
 
Posts: n/a
Default Write to outputstream in PGStream blocks indefinitely

I am having a problem where by my application freezes after a period
of time under load. Doing a thread dump shows a large number of
threads seem to be attempting to write to output streams as shown
below. The application code is attempting to add a single row to a
table, including binary data of between 3kb - 10kb. This requires a
restart of the application to clear.

Has anyone else seen similar behaviour? Could this be related to the
issue discussed in
http://archives.postgresql.org/pgsql...2/msg00096.php where
the server and driver are filling their respective buffers. If so
what is the best approach to reducing the likelyhodd of this
happening.

This occurs using PostgreSQL 8.0.3 with JDBC driver version 8.0-311.


Regards

Jonas




"Thread-49" prio=5 tid=0x00488d08 nid=0x1397 runnable [cc77e000..cc77fc28]
at org.postgresql.core.PGStream.Send(PGStream.java:20 7)
at org.postgresql.core.PGStream.SendStream(PGStream.j ava:479)
at org.postgresql.core.v3.SimpleParameterList.streamB ytea(SimpleParameterList.java:118)
at org.postgresql.core.v3.SimpleParameterList.writeV3 Value(SimpleParameterList.java:201)
at org.postgresql.core.v3.QueryExecutorImpl.sendBind( QueryExecutorImpl.java:816)
at org.postgresql.core.v3.QueryExecutorImpl.sendOneQu ery(QueryExecutorImpl.java:1008)
at org.postgresql.core.v3.QueryExecutorImpl.sendQuery (QueryExecutorImpl.java:599)
at org.postgresql.core.v3.QueryExecutorImpl.execute(Q ueryExecutorImpl.java:173)
- locked <0xd616e6c0> (a org.postgresql.core.v3.QueryExecutorImpl)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execut e(AbstractJdbc2Statement.java:389)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execut eWithFlags(AbstractJdbc2Statement.java:330)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execut eUpdate(AbstractJdbc2Statement.java:282)

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-15-2008, 11:23 PM
Oliver Jowett
 
Posts: n/a
Default Re: Write to outputstream in PGStream blocks indefinitely

Jonas Partner wrote:
> I am having a problem where by my application freezes after a period
> of time under load. Doing a thread dump shows a large number of
> threads seem to be attempting to write to output streams as shown
> below. The application code is attempting to add a single row to a
> table, including binary data of between 3kb - 10kb. This requires a
> restart of the application to clear.
>
> Has anyone else seen similar behaviour? Could this be related to the
> issue discussed in
> http://archives.postgresql.org/pgsql...2/msg00096.php where
> the server and driver are filling their respective buffers. If so
> what is the best approach to reducing the likelyhodd of this
> happening.


It seems unlikely that this is the cause if you're only doing a single
update..

Things to try:

- Add '?logLevel=2' to your connection URL -- this should spew lots of
driver debug info to stderr.

- If the data's not sensitive, grab a tcpdump capture (-s 1514 -w
/some/output/file) of a connection that hangs and send me a copy (off-list).

- Attach gdb to the corresponding backend to see what it is doing when
everything stops. Perhaps it's got stuck waiting for a lock, or
something similar?

-O

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:47 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com