[Dspace-tech] An I/O error occured while sending to the backend in tomcat log

290 views
Skip to first unread message

John Preston

unread,
Aug 24, 2015, 4:16:44 PM8/24/15
to dspac...@lists.sourceforge.net
I wrote some months ago about this problem that I am having RE: errors in the tomcat logs. There dosen't seem to be any ill effect as dspace still runs, but its getting very annoying, and every so often I get a Internal Server Error which a refresh of the page seems to solve. I'm not sure if this is related. I've included a section of the tomcat log and I'm wondering if there is some tweek that I must do to the apache pooling code which seems to be employ.

I've tried all the various incarnations of postgres jar files with no success. I'm running dspace 1.4.0 on fedora core 5, with postgres 8.1 and java 1.6. Ive tried it with 1.5 but the same happens. Any help would be appreciated.

Nov 14, 2006 7:40:34 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
org.postgresql.util.PSQLException: An I/O error occured while sending to the backend.
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:214)
        at org.postgresql.jdbc2.AbstractJdbc2Connection.executeTransactionCommand(AbstractJdbc2Connection.java:617)
        at org.postgresql.jdbc2.AbstractJdbc2Connection.rollback(AbstractJdbc2Connection.java:654)
        at org.apache.commons.dbcp.DelegatingConnection.rollback(DelegatingConnection.java:265)
        at org.apache.commons.dbcp.DelegatingConnection.rollback(DelegatingConnection.java:265)
        at org.apache.commons.dbcp.PoolingDriver$PoolGuardConnectionWrapper.rollback(PoolingDriver.java:348)
        at org.dspace.core.Context.abort(Context.java:251)
        at org.dspace.core.Context.finalize(Context.java:384)
        at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
        at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
        at java.lang.ref.Finalizer.access$100(Finalizer.java:14)
        at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)
Caused by: java.net.SocketException: Socket closed
        at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:99)
        at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
        at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
        at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
        at org.postgresql.core.PGStream.flush(PGStream.java:532)
        at org.postgresql.core.v3.QueryExecutorImpl.sendSync(QueryExecutorImpl.java:672)
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:187)
        ... 11 more
java.sql.SQLException: Already closed.
        at org.apache.commons.dbcp.PoolableConnection.close(PoolableConnection.java:77)
        at org.apache.commons.dbcp.PoolingDriver$PoolGuardConnectionWrapper.close(PoolingDriver.java:240)
        at org.dspace.storage.rdbms.DatabaseManager.freeConnection(DatabaseManager.java:733)
        at org.dspace.core.Context.abort(Context.java:260)
        at org.dspace.core.Context.finalize(Context.java:384)
        at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
        at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
        at java.lang.ref.Finalizer.access$100(Finalizer.java:14)
        at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)

Richard Jones

unread,
Aug 24, 2015, 4:16:47 PM8/24/15
to Bjorn Skobba, dspac...@lists.sourceforge.net
Hi,

The critical bit is that Context.finalize() is being called:

>>org.dspace.storage.rdbms.DatabaseManager.freeConnection(DatabaseManager.java:733)
>> at org.dspace.core.Context.abort(Context.java:260)
>> at org.dspace.core.Context.finalize(Context.java:384)

This is effectively the Destructor for the context object, which is
called when the garbage collector picks up a discarded Context object.

I get these periodically too, and they appear to be the result of some
sort of connection leak, although I've not been able to track it down.
Presumably a Context is initialised and a database connection opened,
but that connection is aborted without the context object itself being
completed (I think). Then when the Context is discarded, a second
attempt to abort causes the below error.

If anyone else has any further experience on this, or ideas how we might
isolate the problem that would be great!

Cheers,

Richard

> On Tue, 2006-11-14 at 20:44 -0500, John Preston wrote:
>> I wrote some months ago about this problem that I am having RE: errors
>> in the tomcat logs. There dosen't seem to be any ill effect as dspace
>> still runs, but its getting very annoying, and every so often I get a
>> Internal Server Error which a refresh of the page seems to solve. I'm
>> not sure if this is related. I've included a section of the tomcat log
>> and I'm wondering if there is some tweek that I must do to the apache
>> pooling code which seems to be employ.
>>
>> I've tried all the various incarnations of postgres jar files with no
>> success. I'm running dspace 1.4.0 on fedora core 5, with postgres 8.1
>> and java 1.6. Ive tried it with 1.5 but the same happens. Any help
>> would be appreciated.
>
> Hi,
>
> Not of any help, but I see the same errors in my tomcat log. I'm running
> DSpace 1.3.2 on Suse Enterprise 9 SP3 with postgres 8.1.4 and java 1.5
>
> Kind regards
> Bjorn Skobba
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> DSpace-tech mailing list
> DSpac...@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dspace-tech


--
Richard
-------
Richard Jones
Web and Database Technology Specialist
Imperial College London
t: +44 (0)20 759 48614 / +44 (0)20 759 41815
e: richard...@imperial.ac.uk

Bjorn Skobba

unread,
Aug 24, 2015, 4:16:47 PM8/24/15
to John Preston, dspac...@lists.sourceforge.net
On Tue, 2006-11-14 at 20:44 -0500, John Preston wrote:
> I wrote some months ago about this problem that I am having RE: errors
> in the tomcat logs. There dosen't seem to be any ill effect as dspace
> still runs, but its getting very annoying, and every so often I get a
> Internal Server Error which a refresh of the page seems to solve. I'm
> not sure if this is related. I've included a section of the tomcat log
> and I'm wondering if there is some tweek that I must do to the apache
> pooling code which seems to be employ.
>
> I've tried all the various incarnations of postgres jar files with no
> success. I'm running dspace 1.4.0 on fedora core 5, with postgres 8.1
> and java 1.6. Ive tried it with 1.5 but the same happens. Any help
> would be appreciated.

Hi,

Not of any help, but I see the same errors in my tomcat log. I'm running
DSpace 1.3.2 on Suse Enterprise 9 SP3 with postgres 8.1.4 and java 1.5

Kind regards
Bjorn Skobba

>

John Preston

unread,
Aug 24, 2015, 4:19:35 PM8/24/15
to dspac...@lists.sourceforge.net
It seems to me that in some cases the errors occur when a sync message is sent between the jdbc driver and the postgres database driver. I get some of these messages at startup of tomcat before dspace is accessed by a user.

I'm also experiencing a problem with running out of pooled connections with 2 users from time to time. It seems that there is a some connection leaking. I'm wondering if it has to do with postgres 8.x and the settings.
Reply all
Reply to author
Forward
0 new messages