Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Usenet -> c.d.o.server -> Re: (Java) Synchronizing multiple app servers through Oracle

Re: (Java) Synchronizing multiple app servers through Oracle

From: Robert Klemme <>
Date: Thu, 20 Dec 2007 00:22:52 -0800 (PST)
Message-ID: <>

On Dec 19, 9:05 pm, wrote:
> > > Typically the lock will last less than one second.
> > I'd say that's pretty long. How often will you - pardon, your
> > application - acquire the lock and what's the general load pattern of
> > the application?
> Yes, it's not that short of a period of time, but unfortunately,
> that's how long it takes to grab unique records. Right now we have 2
> app servers each hitting the database once per second and acquiring a
> lock. However, the number of app servers could grow to 10 or more.

This is a recipe for disaster, i.e., bottleneck. Whenever you have a / single/ shared resource (that's what I derive from your first posting) that needs exclusive access and you increase the number of accessors to the resource you will likely soon get into trouble - no matter what synchronization mechanisms you use.

> I
> wrote a multi-threaded test to simulate multiple servers, and found
> that Oracle appears to have a problem when more than 10 locks are
> acquired at the same time. It seems to just give up and wait for the
> timeout once too many have been acquired. Is there a setting in
> Oracle to handle more simultaneous locks?

Now you talk about 10 locks acquired concurrently. So, what do you have? A single shared resource or a bunch of shared resources? Do your app servers need exclusive access to the whole DB as your original posting suggests or do they need exclusive access to portion of the DB only?

Yes, of course you can control things like timeouts etc. But it seems you should first work on a conceptual level to determine whether you actually need exclusive access to a single (or multiple?) resource. I don't know what your app servers do but if you disclose more detail of the nature of your operations we might be able to come up with suggestions.

Kind regards

robert Received on Thu Dec 20 2007 - 02:22:52 CST

Original text of this message