Hi,

Thanks for the note.  Ok, I'll set defaultIdMethod="native" which
should handle it.

However, It surprises me that the IDBroker doesn't work in a cluster
environment.  The error message  for non-transaction safe database
says "don't use Torque with a non-transaction database with multiple
JVM's".  I've always assumed that meant if I used a transaction-safe
database multiple JVM's would be ok.

Incidentally, it turns out that error was in a block of code using the
IDBroker to get Id's and then doing my own bulk insert queries (for
faster performance).  I was getting one id at a time.  I'm suspecting
if I raise the number of cached id's then got 20 at a time from the
IDBroker there'd be less chance of a race condition.

Best, WILL

On 12/5/06, Damien Corbishley <[EMAIL PROTECTED]> wrote:
I would let the database generate the unique ID's. That's one of the
things they are good at.



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Will Glass-Husain
Sent: 05 December 2006 15:05
To: [email protected]
Subject: duplicate ID exception in cluster

Hi,

I just set up a new 2 server cluster with two instances of Tomcat both
reading/writing from a single database.  I'm using Torque 3.0, the
default ID Broker and MySQL 5. (InnoDB)

My problem... Under heavy load, I notice that most write requests on one
of the servers fails with a duplicate ID error.  Typically, each page
request that fails does 10-20 insert statements.

Any tips as to how I might make this cluster work with simultaneous
writes?

WILL

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


This e-mail transmission may contain information that is proprietary, 
privileged and/or confidential and is intended exclusively for the person(s) to 
whom it is addressed. Any use, copying, retention or disclosure by any person 
other than the intended recipient or the intended recipient's designees is 
strictly prohibited. If you are the intended recipient, you must treat the 
information in confidence and in accordance with all laws related to the 
privacy and confidentiality of such information.  If you are not the intended 
recipient or their designee, please notify the sender immediately by return 
e-mail and delete all copies of this email, including all attachments.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Forio Business Simulations

Will Glass-Husain
[EMAIL PROTECTED]
www.forio.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to