Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id C7022200C1C for ; Wed, 15 Feb 2017 23:28:11 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id C593B160B4D; Wed, 15 Feb 2017 22:28:11 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 8799D160B5E for ; Wed, 15 Feb 2017 23:28:10 +0100 (CET) Received: (qmail 39690 invoked by uid 500); 15 Feb 2017 22:28:09 -0000 Mailing-List: contact user-help@ofbiz.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@ofbiz.apache.org Delivered-To: mailing list user@ofbiz.apache.org Received: (qmail 39535 invoked by uid 99); 15 Feb 2017 22:28:09 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Feb 2017 22:28:09 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id B7AE8C095D for ; Wed, 15 Feb 2017 22:28:08 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.28 X-Spam-Level: X-Spam-Status: No, score=0.28 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id ptqnRqE6KW2K for ; Wed, 15 Feb 2017 22:28:07 +0000 (UTC) Received: from smtp26.services.sfr.fr (smtp26.services.sfr.fr [93.17.128.10]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id B15CB5FAE6 for ; Wed, 15 Feb 2017 22:28:06 +0000 (UTC) Received: from [192.168.1.2] (33.223.130.77.rev.sfr.net [77.130.223.33]) by msfrf2627.sfr.fr (SMTP Server) with ESMTP id 8DF471C002402 for ; Wed, 15 Feb 2017 23:26:59 +0100 (CET) Received: from [192.168.1.2] (33.223.130.77.rev.sfr.net [77.130.223.33]) (Authenticated sender: jacques.leroux60@sfr.fr) by msfrf2627.sfr.fr (SMTP Server) with ESMTPA for ; Wed, 15 Feb 2017 23:26:59 +0100 (CET) Authentication-Results: sfr.fr; auth=pass (PLAIN) smtp.auth=jacques.leroux60@sfr.fr Subject: Re: MySQL Deadlocks in OfBiz 12.04 To: user@ofbiz.apache.org References: From: Jacques Le Roux Organization: Les Arts Informatiques Message-ID: <3dc13d3d-05b1-a021-a436-8c84b82922cb@les7arts.com> Date: Wed, 15 Feb 2017 23:27:02 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: X-sfr-mailing: LEGIT Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit archived-at: Wed, 15 Feb 2017 22:28:12 -0000 Hi Robb, Just to be sure, the MySQL version you use >= 5.6.4 ? Jacques Le 15/02/2017 à 20:03, Robb Wagoner a écrit : > We are running OfBiz 12.04 and are using MySQL 5.6 as the RDBMS. We are > experiencing database deadlocks and would like to be able to add > MySQL-specific statements to deal with the deadlocks. For example: `SELECT > ... FOR UPDATE` on PRIMARY KEYs and/or FOREIGN KEYs in the transactions. > > Being new to OfBiz, I've been reviewing the ofbiz-user and ofbiz-dev > archives, OfBiz Wiki, Packt's *Apache OfBiz Cookbook*, and other resources > to learn how we can achieve this. > I see mentions of deadlocks in the archives and in JIRA issues ( > https://issues.apache.org/jira/browse/OFBIZ-5065). Nothing conclusive or > directly actionable on managing/dealing with deadlocks is mentioned. > > What is the OfBiz-way of dealing with RDBMS deadlocks? > > > *Deadlocking statements:* > UPDATE SHIPMENT > UPDATE INVENTORY_ITEM > UPDATE GL_ACCOUNT_ORGANIZATION > INSERT INTO ACCTG_TRANS_ENTRY > > > *entityengine.xml datasource element:* > helper-class="org.ofbiz.entity.datasource.GenericHelperDAO" > field-type-name="mysql" > check-on-start="true" > add-missing-on-start="true" > check-pks-on-start="false" > check-indices-on-start="false" > use-foreign-keys="true" > join-style="ansi-no-parenthesis" > alias-view-columns="false" > drop-fk-use-foreign-key-keyword="true" > table-type="InnoDB" > character-set="utf8" > collate="utf8_general_ci"> > > > > > > jdbc-driver="com.mysql.jdbc.Driver" > jdbc-uri="jdbc:mysql:// > ofbiz-db.example.com/ofbiz?autoReconnect=true" > jdbc-username="ofbiz" > jdbc-password="XXXXpasswordXXXX" > isolation-level="ReadCommitted" > pool-minsize="2" > pool-maxsize="250" > time-between-eviction-runs-millis="600000"/> > > >