Return-Path: Delivered-To: apmail-db-torque-user-archive@www.apache.org Received: (qmail 90960 invoked from network); 5 Dec 2006 22:43:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Dec 2006 22:43:07 -0000 Received: (qmail 23553 invoked by uid 500); 5 Dec 2006 22:43:14 -0000 Delivered-To: apmail-db-torque-user-archive@db.apache.org Received: (qmail 23528 invoked by uid 500); 5 Dec 2006 22:43:14 -0000 Mailing-List: contact torque-user-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Apache Torque Users List" Reply-To: "Apache Torque Users List" Delivered-To: mailing list torque-user@db.apache.org Received: (qmail 23517 invoked by uid 99); 5 Dec 2006 22:43:14 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Dec 2006 14:43:14 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of wglasshusain@gmail.com designates 64.233.162.231 as permitted sender) Received: from [64.233.162.231] (HELO nz-out-0102.google.com) (64.233.162.231) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Dec 2006 14:43:03 -0800 Received: by nz-out-0102.google.com with SMTP id z3so4594nzf for ; Tue, 05 Dec 2006 14:42:43 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=VBUe9smA/i821IegWbANRd9GypzxmdVfBE/U0d3Or2G6xvckzw89nDreftMD8sNalqjx3SrgTNN4xYzw85LINKWFmTTLqlbrmkG0Z/JQ3phNH7Ddr4PjSOhFYprOUUgNetBeu8J/iCPM/lfl5bWNyAJCcL7WaUdB8a82oR8cnzE= Received: by 10.35.75.1 with SMTP id c1mr18582435pyl.1165358562991; Tue, 05 Dec 2006 14:42:42 -0800 (PST) Received: by 10.35.12.1 with HTTP; Tue, 5 Dec 2006 14:42:42 -0800 (PST) Message-ID: <2f8a5bd60612051442g2baa906bo1bf7b973e0ea74a8@mail.gmail.com> Date: Tue, 5 Dec 2006 14:42:42 -0800 From: "Will Glass-Husain" Sender: wglasshusain@gmail.com To: "Apache Torque Users List" , hps@intermeta.de Subject: Re: duplicate ID exception in cluster In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <2f8a5bd60612050704s6924522di1742dc880efa2430@mail.gmail.com> X-Google-Sender-Auth: d44d2bd72533860e X-Virus-Checked: Checked by ClamAV on apache.org 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 wrote: > "Will Glass-Husain" 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 -- hps@intermeta.de | 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: torque-user-unsubscribe@db.apache.org > For additional commands, e-mail: torque-user-help@db.apache.org > > -- Forio Business Simulations Will Glass-Husain wglass@forio.com www.forio.com --------------------------------------------------------------------- To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org For additional commands, e-mail: torque-user-help@db.apache.org