You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by Nick Longinow <ni...@vanhooseassociates.com> on 2004/11/10 22:42:55 UTC

Using compress to fix Oracle put,versionControl problem for all but tiny files... Will memory return ?

I am ok with using this method, at least until I or someone else can put a
solid fix in for the non compress approach. 

My question is kind of a Tomcat one, but if I allocate a larger JVM to
Tomcat, and it then uses a big chunk of it for doing an upload, will that
memory be freed and thus reusable ?  

Nick

-----Original Message-----
From: Oliver Zeigermann [mailto:oliver.zeigermann@gmail.com] 
Sent: Wednesday, November 10, 2004 4:22 PM
To: Slide Users Mailing List
Subject: Re: I also have trouble doing versionControl in Oracle... Memory
issue ? Compress fixes it.

I seem to remember that other people have reported the Oracle store
failes with larger files. Maybe we will have to go back to the old
version using the Oracle jars?

Davide, does it work for you with larger files as well?


On Wed, 10 Nov 2004 16:19:04 -0500, Nick Longinow
<ni...@vanhooseassociates.com> wrote:
> Yes, compress will fix this issue for Oracle.
> 
> I will try to go look at the code paths in the CommonRDBMSAdapter to see
why
> the other one is failing for the Oracle store.
> Nick
> 
> -----Original Message-----
> From: Nick Longinow [mailto:nicklonginow@vanhooseassociates.com]
> Sent: Wednesday, November 10, 2004 4:15 PM
> To: 'Slide Users Mailing List'
> Subject: RE: I also have trouble doing versionControl in Oracle... Memory
> issue ?
> 
> Ok, I finally have it cornered; its some kind of memory problem.
> If I attempt these operations (put, versionControl) on a very small file,
> it works completely, all steps succeed.
> 
> I'll go check to see how compress helps the situation.
> Nick
> 
> -----Original Message-----
> From: Oliver Zeigermann [mailto:oliver.zeigermann@gmail.com]
> Sent: Wednesday, November 10, 2004 3:49 PM
> To: Slide Users Mailing List
> Subject: Re: I also have trouble doing versionControl in Oracle...
> 
> Your problem seems to be different from Nick's. I guess it might be
> related to using JBoss's connection pool. Normally, the connection is
> closed upon commit or rollback of the Slide transaction in
> AbstractRDBMSStore.
> 
> Oliver
> 
> On Wed, 10 Nov 2004 12:25:46 -0800, Richard Emberson
> <re...@edgedynamics.com> wrote:
> > I've determined that the HttpServletRequest ServletInputStream is NOT
> > closed before the error occurs. I modified the AbstractWebdavMethod run
> > method changing the line:
> >
> >          this.req = req;
> >
> > to:
> >
> > System.out.println("XXXXXXXXXXXX AbstractWebdavMethod.run
> > HttpServletRequestWrapper Method="
> > +req.getMethod());
> >          this.req = new
javax.servlet.http.HttpServletRequestWrapper(req)
> {
> >              public javax.servlet.ServletInputStream getInputStream()
> >                                            throws java.io.IOException {
> > System.out.println("XXXXXXXXXXXX
> HttpServletRequestWrapper.getInputStream");
> > new Exception().printStackTrace();
> >                  //return super.getInputStream();
> >                  final javax.servlet.ServletInputStream sis =
> >                          super.getInputStream();
> >                  return new javax.servlet.ServletInputStream() {
> >                      public int readLine(byte[] b, int off, int len)
> >                                      throws java.io.IOException {
> >                          return sis.readLine(b, off, len);
> >                      }
> >                      public int read() throws IOException {
> >                          return sis.read();
> >                      }
> >                      public void close() throws IOException {
> > System.out.println("XXXXXXXXXXXX ServletInputStream.close");
> > new Exception().printStackTrace();
> >                          sis.close();
> >                      }
> >
> >                  };
> >              }
> >          };
> >
> > This prints 1) when the getInputStream is called on the
> > HttpServletRequest and 2) when the HttpServletRequest's
> > ServletInputStream close method is called. With this I can
> > determine where and how often the close method is called.
> >
> > I start Slide (an ear in jboss) and use the webdavclient.
> > I open a connection and "cd" into files. Then I put a file.
> > In Slide it first executes a PROPFIND method which returns
> > "not found". It then executes the PUT method.
> > The HttpServletRequestWrapper.getInputStream is called at:
> >
> > PutMethod.executeRequest line 405
> >
> > // Creating revisionDescriptor associated with the object
> > NodeRevisionContent revisionContent =
> >     new NodeRevisionContent();
> > revisionContent.setContent(req.getInputStream());
> >
> > Then the Broken pipe io exception is printed:
> >
> > 2004-11-10 10:41:10,165 WARN  [JBossManagedConnectionPool]  - Exception
> > destroying ManagedConnection
> >
>
org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventLi
> stener@7745b[state=DESTROYED
> > mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@1bb88ba
> > handles=0 lastUse=1100112064679 permit=true trackByTx=false
> >
>
mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@
> e690ac
> >
>
context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@1
> 243198]
> > org.jboss.resource.JBossResourceException: SQLException; - nested
> > throwable: (java.sql.SQLException: Io exception: Broken pipe)
> >          at
> >
>
org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.checkException(
> BaseWrapperManagedConnection.java:572)
> > ............
> >
> > Which happens in the file CommonRDBMSAdapter method storeContent at line
> > 403:
> >
> >      try {
> >          long versionID = getVersionID(connection, uri.toString(),
> > revisionDescriptor);
> > statement = connection.prepareStatement(
> >              "insert into VERSION_CONTENT (VERSION_ID, CONTENT) values
> > (?,?)");
> > statement.setLong(1, versionID);
> >          statement.setBinaryStream(2, is, (int) blobLength);
> >          statement.executeUpdate();
> >          if (tempFile != null) {
> > is.close();
> >              is = null;
> >              tempFile.delete();
> > }
> >      } finally {
> >          try {
> >              close(statement);
> >          } finally {
> >              if (is != null) {
> >                  // XXX some JDBC drivers seem to close the stream upon
> >                  // closing of
> >                  // // the statement; if so this will raise an
> >                  // IOException
> >                  // silently ignore it...
> >                  try {
> >                      is.close();
> >                  } catch (IOException ioe) {
> >                      logger.log("Could not close stream", ioe,
> > LOG_CHANNEL, Logger.DEBUG);
> >                  }
> >              }
> >          }
> >      }
> >
> > The "close(statement);" call is what generates the error message.
> > Then the HttpServletRequest's ServletInputStream is closed in the
> > call "is.close();" a couple of lines later.
> >
> > So, I believe that its NOT a InputStream close issue since that happens
> > after the Oracle connection SQLException.
> >
> > So the question is where is the Oracle DB connection being closed?
> >
> > RME
> >
> >
> >
> > Oliver Zeigermann wrote:
> > > Without really having looked into this the error seems to say that the
> > > stream to read from has already been closed. This may mean there is a
> > > bug in the Slide core or (more likely) in the Oracle store.
> > >
> > > Oliver
> > >
> > >
> > > On Wed, 10 Nov 2004 10:47:21 -0500, Nick Longinow
> > > <ni...@vanhooseassociates.com> wrote:
> > >
> > >>I get this error when I do a versionControlMethod, using classes12.jar
> and
> > >>Oracle 10g.
> > >>
> > >>Looking through the stores code, the storeContent method is the same
> here as
> > >>when I do a putMethod (which works fine).  The difference must come
from
> up
> > >>the line somewhere, in the creation of the RevisionContent object.  Is
> it
> > >>possibly some error in retrieving it, a permissions violation perhaps,
> that
> > >>is not being flagged, and so the stream sent to storeContent is empty
?
> It
> > >>must be something like this, since put works.
> > >>
> > >>Nick
> > >>
> > >>http-8080-Processor24, 10-Nov-2004 10:19:43, root, PUT, 201 "Created",
> 250
> > >>ms, /files/Z2/AAA/cc/Working Files/g.doc
> > >>
> > >>http-8080-Processor24, 10-Nov-2004 10:19:44, root, PROPPATCH, 207
> > >>"Multi-Status", 109 ms, /files/Z2/AAA/cc/Working Files/g.doc
> > >>
> > >>10 Nov 2004 10:19:45 -
> > >>org.apache.slide.store.impl.rdbms.StandardRDBMSAdapter - ERROR - SQL
> error
> > >>17002 on /history/1: Io exception: No more data to
> > >>
> > >>read from socket
> > >>
> > >>java.sql.SQLException: Io exception: No more data to read from socket
> > >>
> > >>        at
> >
>
>>oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
> > >>
> > >>        at
> >
>
>>oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162)
> > >>
> > >>        at
> >
>
>>oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:274)
> > >>
> > >>        at
> >
>
>>oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedStatem
> en
> > >>t.java:559)
> > >>
> > >>        at
> >
>
>>oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.ja
> va
> > >>:1028)
> > >>
> > >>        at
> >
>
>>oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedS
> ta
> > >>tement.java:2888)
> > >>
> > >>        at
> >
>
>>oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedSta
> te
> > >>ment.java:2960)
> > >>
> > >>        at
> >
>
>>org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(Delegati
> ng
> > >>PreparedStatement.java:101)
> > >>
> > >>        at
> >
>
>>org.apache.slide.store.impl.rdbms.CommonRDBMSAdapter.storeContent(CommonRD
> BM
> > >>SAdapter.java:344)
> > >>
> > >>        at
> >
>
>>org.apache.slide.store.impl.rdbms.StandardRDBMSAdapter.storeRevisionConten
> t(
> > >>StandardRDBMSAdapter.java:1101)
> > >>
> > >>        at
> >
>
>>org.apache.slide.store.impl.rdbms.StandardRDBMSAdapter.createRevisionConte
> nt
> > >>(StandardRDBMSAdapter.java:1054)
> > >>
> > >>        at
> >
>
>>org.apache.slide.store.impl.rdbms.AbstractRDBMSStore.createRevisionContent
> (A
> > >>bstractRDBMSStore.java:823)
> > >>
> > >>        at
> >
>
>>org.apache.slide.store.AbstractStore.createRevisionContent(AbstractStore.j
> av
> > >>a:1347)
> > >>
> > >>        at
> >
>
>>org.apache.slide.store.ExtendedStore.createRevisionContent(ExtendedStore.j
> av
> > >>a:508)
> > >>
> > >>        at
> org.apache.slide.content.ContentImpl.create(ContentImpl.java:515)
> > >>
> > >>        at
> >
>
>>org.apache.slide.webdav.util.VersioningHelper.versionControl(VersioningHel
> pe
> > >>r.java:306)
> > >>
> > >>
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: slide-user-help@jakarta.apache.org
> > >
> >
> > --
> > This email message is for the sole use of the intended recipient(s) and
> > may contain confidential information.  Any unauthorized review, use,
> > disclosure or distribution is prohibited.  If you are not the intended
> > recipient, please contact the sender by reply email and destroy all
> > copies of the original message.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: slide-user-help@jakarta.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-user-help@jakarta.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-user-help@jakarta.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-user-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org