Ah, so it is an application cluster, not a db cluster (sorry, didn't saw
that in your first mail).
You get this behaviour when the two nodes refresh their Id Broker from
the DB. Try
torque.idbroker.cleverquantity=false
torque.idbroker.prefetch=false
Better yet, don't use the Id broker but use an AUTO_INCREMENT column.
Best regards
Henning
On Tue, 2006-12-05 at 14:42 -0800, Will Glass-Husain wrote:
> Hi Henning!
>
> It's a real (Tomcat) cluster. Two instances of Tomcat talking to a
> single database. (no database replication). I use Apache/mod_jk to
> split requests (based on session) between the two Tomcats. Allows me
> to run high number of users with a memory-heavy application.
>
> Thought briefly about database replication but since this is
> write-heavy application it didn't seem to make sense.
>
> thanks,
> WILL
>
> On 12/5/06, Henning P. Schmiedehausen <[EMAIL PROTECTED]> wrote:
> > "Will Glass-Husain" <[EMAIL PROTECTED]> writes:
> >
> > >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)
> >
> > Real cluster or just master/slave (or master/master with only one master
> > active at a time)? The latter is just replication, not a real cluster.
> >
> > >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?
> >
> > a) in a master/master config, you can not write to both masters at the
> > same time. End of story. I had a summer project where we tested
> > exactly that *very* extensively. It does not work. No matter what you
> > google on the internet or what mysql.com wants to tell you. You will
> > get the described error sooner or later. If you want to have
> > master/master with failover, that is fine. Two active masters not.
> >
> > b) you probably run into the AUTO_INCREMENT problem. Make sure that you
> > have 5.0.20 at least. See
> > http://dev.mysql.com/doc/refman/5.0/en/replication-features.html
> > for some docs.
> >
> >
> > Best regards
> > Henning
> >
> > --
> > Henning P. Schmiedehausen -- [EMAIL PROTECTED] | J2EE, Linux,
> > 91054 Buckenhof, Germany -- +49 9131 506540 | Apache person
> > Open Source Consulting, Development, Design | Velocity - Turbine guy
> >
> > "Save the cheerleader. Save the world."
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
--
Henning P. Schmiedehausen -- [EMAIL PROTECTED] | J2EE, Linux,
91054 Buckenhof, Germany -- +49 9131 506540 | Apache person
Open Source Consulting, Development, Design | Velocity - Turbine guy
"Save the cheerleader. Save the world."
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]