You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ode.apache.org by Rafal Perkowski <ra...@gmail.com> on 2011/02/24 10:51:02 UTC

Problem with database - A lock could not be obtained due to a deadlock

Hi,

I have two processes:
GenericInvoke - this process invoke AddTask method from external
webservice and waiting for response (invoke method GetResult from
external webservice every 15 s until receive response). I set endpoint
from url in input variable.
MainProcess - invoke 10 times (sometimes 2 parallels invoke in flow)
GenericInvoke.

If I start one instance it always finish sucessfull.
If I start 10 instances with embedded databse it finsh sucessfull, but
It takes a lot of time and I get a lot of errors "A lock could not be
obtained due to a deadlock" (errors in attachment).
If I start 10 instances with external databse (SQL Server) 5-6 finish
succesfull and 4-5 instances stuck with state active (errors in
attachment).

I think that apache dosn't support deadlock for Sql Server.
I have to use SQL Server. Can you advise how can I fix this problem?

Thanks,

Rafal

Re: Problem with database - A lock could not be obtained due to a deadlock

Posted by Rafal <ra...@gmail.com>.
Hi Milinda,

Thanks for response.

I use:
Tomcat 7.0
ODE 1.3.5
SQL Server 2008 R2

Now I am using ode-axis2.db.mode=INTERNAL instead of external and it
works fine, but I still get a lot of errors ( I attached log file and
ode-axis2.properties):

15:27:00,508 ERROR [JDBCExceptionReporter] Transaction (Process ID 52)
was deadlocked on lock resources with another process and has been
chosen as the deadlock victim. Rerun the transaction.

Thanks,

Rafal

On Fri, Mar 11, 2011 at 11:13 AM, Milinda Pathirage
<mi...@gmail.com> wrote:
> Hi Rafal,
>
> Embedded Derby database can't handle concurrent requests to ODE. Best thing
> is to use external database server if you are going to production with ODE
> or if you are doing any load tests. According to your log it cannot be a
> issue in DB. Can you tell us the ODE version you are using.
>
> Thanks
> Milinda
>
> On Thu, Feb 24, 2011 at 3:21 PM, Rafal Perkowski <ra...@gmail.com>
> wrote:
>>
>> Hi,
>>
>> I have two processes:
>> GenericInvoke - this process invoke AddTask method from external
>> webservice and waiting for response (invoke method GetResult from
>> external webservice every 15 s until receive response). I set endpoint
>> from url in input variable.
>> MainProcess - invoke 10 times (sometimes 2 parallels invoke in flow)
>> GenericInvoke.
>>
>> If I start one instance it always finish sucessfull.
>> If I start 10 instances with embedded databse it finsh sucessfull, but
>> It takes a lot of time and I get a lot of errors "A lock could not be
>> obtained due to a deadlock" (errors in attachment).
>> If I start 10 instances with external databse (SQL Server) 5-6 finish
>> succesfull and 4-5 instances stuck with state active (errors in
>> attachment).
>>
>> I think that apache dosn't support deadlock for Sql Server.
>> I have to use SQL Server. Can you advise how can I fix this problem?
>>
>> Thanks,
>>
>> Rafal
>
>
>
> --
> Milinda Pathirage
> Technical Lead & Product Manager WSO2 BPS; http://wso2.org/bps
> WSO2 Inc.; http://wso2.com
> E-mail: milinda@wso2.com, milinda.pathirage@gmail.com
> Web: http://mpathirage.com
> Blog: http://blog.mpathirage.com
>

Re: Problem with database - A lock could not be obtained due to a deadlock

Posted by Milinda Pathirage <mi...@gmail.com>.
Hi Rafal,

Embedded Derby database can't handle concurrent requests to ODE. Best thing
is to use external database server if you are going to production with ODE
or if you are doing any load tests. According to your log it cannot be a
issue in DB. Can you tell us the ODE version you are using.

Thanks
Milinda

On Thu, Feb 24, 2011 at 3:21 PM, Rafal Perkowski <ra...@gmail.com>wrote:

> Hi,
>
> I have two processes:
> GenericInvoke - this process invoke AddTask method from external
> webservice and waiting for response (invoke method GetResult from
> external webservice every 15 s until receive response). I set endpoint
> from url in input variable.
> MainProcess - invoke 10 times (sometimes 2 parallels invoke in flow)
> GenericInvoke.
>
> If I start one instance it always finish sucessfull.
> If I start 10 instances with embedded databse it finsh sucessfull, but
> It takes a lot of time and I get a lot of errors "A lock could not be
> obtained due to a deadlock" (errors in attachment).
> If I start 10 instances with external databse (SQL Server) 5-6 finish
> succesfull and 4-5 instances stuck with state active (errors in
> attachment).
>
> I think that apache dosn't support deadlock for Sql Server.
> I have to use SQL Server. Can you advise how can I fix this problem?
>
> Thanks,
>
> Rafal
>



-- 
Milinda Pathirage
Technical Lead & Product Manager WSO2 BPS; http://wso2.org/bps
WSO2 Inc.; http://wso2.com
E-mail: milinda@wso2.com, milinda.pathirage@gmail.com
Web: http://mpathirage.com
Blog: http://blog.mpathirage.com