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 Peder Nordvaller <pe...@vitaminapplications.se> on 2005/07/02 00:05:11 UTC

Slide concurrency / "sequential-mode"

Hello,

I've deployed a clean installation of Slide 2.1 (as a webapp/.war), and 
configured it to be used with MySQL 4.1 which works like a charm. However, 
when I try to upload several files that takes a while to transfer at once to 
a directory they seem to be uploaded sequentially which hinders concurrent 
performance when many users put files. I noticed the configuration-parameter 
"sequential-mode" that was set to full in the base installation of slide:

            <!-- Can be "off", "write" and "full" -->
            <parameter name="sequential-mode">full</parameter>

But when I change it to "off" to allow concurrent puts of files, all PUT's 
done while another one is currently uploading eventually fails, with a 
Deadlock-error in the logs (see below). Is it not possible to turn off the 
sequential-mode to achieve better concurrency in Slide, or have I configured 
slide wrong in any way?

Regards, Peder


02 Jul 2005 00:00:53 - org.apache.slide.store.impl.rdbms.MySqlRDBMSAdapter - 
ERROR - SQL error 1205 on /files/test/David_o_Mickey_02.tif: Deadlock found 
when trying to get lock; Try restarting transaction message from server: 
"Lock wait timeout exceeded; try restarting transaction"
java.sql.SQLException: Deadlock found when trying to get lock; Try 
restarting transaction message from server: "Lock wait timeout exceeded; try 
restarting transaction"
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1997)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1906)
at com.mysql.jdbc.MysqlIO.nextRow(MysqlIO.java:997)
at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:296)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1325)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2247)
at 
com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1586)
at 
org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92)
at 
org.apache.slide.store.impl.rdbms.StandardRDBMSAdapter.retrieveObject(StandardRDBMSAdapter.java:273)
at 
org.apache.slide.store.impl.rdbms.AbstractRDBMSStore.retrieveObject(AbstractRDBMSStore.java:416)
at 
org.apache.slide.store.AbstractStore.retrieveObject(AbstractStore.java:594)
at 
org.apache.slide.store.ExtendedStore.retrieveObject(ExtendedStore.java:574)
...
org.apache.slide.common.ServiceAccessException: Service 
org.apache.slide.store.impl.rdbms.JDBCStore@19c0bd6 access error : Deadlock 
found when trying to get lock; Try restarting transaction message from 
server: "Lock wait timeout exceeded; try restarting transaction"
at 
org.apache.slide.store.impl.rdbms.MySqlRDBMSAdapter.createException(MySqlRDBMSAdapter.java:66)
at 
org.apache.slide.store.impl.rdbms.StandardRDBMSAdapter.retrieveObject(StandardRDBMSAdapter.java:350)
at 
org.apache.slide.store.impl.rdbms.AbstractRDBMSStore.retrieveObject(AbstractRDBMSStore.java:416)
... 


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


Re: Slide concurrency / "sequential-mode"

Posted by Oliver Zeigermann <ol...@gmail.com>.
Well, the idea of the sequential mode is to avoid deadlocks. If you
turn it off, you may experience deadlocks. It depends on your RDBMS
how ofter they occur. Trying sequential mode "write" where there is at
most one write at a time, but concurrent reads are possible may be
something to try.

I started implementing a locking that only blocks concurrent writes to
the same directory, but never really finished that. Judging from my
very limited current and future time resources, I am afraid I never
will.

Oliver

On 7/2/05, Peder Nordvaller <pe...@vitaminapplications.se> wrote:
> Hello,
> 
> I've deployed a clean installation of Slide 2.1 (as a webapp/.war), and
> configured it to be used with MySQL 4.1 which works like a charm. However,
> when I try to upload several files that takes a while to transfer at once to
> a directory they seem to be uploaded sequentially which hinders concurrent
> performance when many users put files. I noticed the configuration-parameter
> "sequential-mode" that was set to full in the base installation of slide:
> 
>             <!-- Can be "off", "write" and "full" -->
>             <parameter name="sequential-mode">full</parameter>
> 
> But when I change it to "off" to allow concurrent puts of files, all PUT's
> done while another one is currently uploading eventually fails, with a
> Deadlock-error in the logs (see below). Is it not possible to turn off the
> sequential-mode to achieve better concurrency in Slide, or have I configured
> slide wrong in any way?
> 
> Regards, Peder
> 
> 
> 02 Jul 2005 00:00:53 - org.apache.slide.store.impl.rdbms.MySqlRDBMSAdapter -
> ERROR - SQL error 1205 on /files/test/David_o_Mickey_02.tif: Deadlock found
> when trying to get lock; Try restarting transaction message from server:
> "Lock wait timeout exceeded; try restarting transaction"
> java.sql.SQLException: Deadlock found when trying to get lock; Try
> restarting transaction message from server: "Lock wait timeout exceeded; try
> restarting transaction"
> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1997)
> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1906)
> at com.mysql.jdbc.MysqlIO.nextRow(MysqlIO.java:997)
> at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:296)
> at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1325)
> at com.mysql.jdbc.Connection.execSQL(Connection.java:2247)
> at
> com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1586)
> at
> org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92)
> at
> org.apache.slide.store.impl.rdbms.StandardRDBMSAdapter.retrieveObject(StandardRDBMSAdapter.java:273)
> at
> org.apache.slide.store.impl.rdbms.AbstractRDBMSStore.retrieveObject(AbstractRDBMSStore.java:416)
> at
> org.apache.slide.store.AbstractStore.retrieveObject(AbstractStore.java:594)
> at
> org.apache.slide.store.ExtendedStore.retrieveObject(ExtendedStore.java:574)
> ...
> org.apache.slide.common.ServiceAccessException: Service
> org.apache.slide.store.impl.rdbms.JDBCStore@19c0bd6 access error : Deadlock
> found when trying to get lock; Try restarting transaction message from
> server: "Lock wait timeout exceeded; try restarting transaction"
> at
> org.apache.slide.store.impl.rdbms.MySqlRDBMSAdapter.createException(MySqlRDBMSAdapter.java:66)
> at
> org.apache.slide.store.impl.rdbms.StandardRDBMSAdapter.retrieveObject(StandardRDBMSAdapter.java:350)
> at
> org.apache.slide.store.impl.rdbms.AbstractRDBMSStore.retrieveObject(AbstractRDBMSStore.java:416)
> ...
> 
> 
> ---------------------------------------------------------------------
> 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