{"id":10536,"date":"2014-04-11T13:15:00","date_gmt":"2014-04-11T13:15:00","guid":{"rendered":"http:\/\/cloudcomputing.sys-con.com\/node\/3050547"},"modified":"2014-04-11T13:15:00","modified_gmt":"2014-04-11T13:15:00","slug":"sync-your-timeouts-when-load-balancers-cause-database-deadlocks","status":"publish","type":"post","link":"https:\/\/icloud.pe\/blog\/sync-your-timeouts-when-load-balancers-cause-database-deadlocks\/","title":{"rendered":"Sync Your Timeouts: When Load Balancers Cause Database Deadlocks"},"content":{"rendered":"<p>Have you seen this error message before \u201cjava.sql.Exception: ORA-00060: deadlock detected while waiting for resource\u201d?<br \/>\nThis is caused when parallel updates require locks on either rows or tables in your database. I recently ran into this exception on an instance of an IBM eCommerce Server. The first thought was that there are simply too many people hitting the same functionality that updates Sales Tax Summary information \u2013 which was showing up in the call stack of the exception:<br \/>\nThe logical conclusion would be to blame this on too many folks accessing this functionality or outdated table statistics causing update statements to run too long causing others to run into that lock. It turned out to be caused by something that wasn\u2019t that obvious and wouldn\u2019t have shown up in any Exception stack traces or log files. A misconfigured timeout setting on the load balancer caused a re-execute of the original incoming web request. While the first app server was still updating the table and holding the lock \u2013 as it had a longer timeout specified as the load balancer \u2013 the second app server tried to do the same thing causing that exception.<\/p>\n<p><a href=\"http:\/\/cloudcomputing.sys-con.com\/node\/3050547\" >read more<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Have you seen this error message before &ldquo;java.sql.Exception: ORA-00060: deadlock detected while waiting for resource&rdquo;?<br \/>\nThis is caused when parallel updates require locks on either rows or tables in your database. I recently ran into this exception on an instance of an IBM eCommerce Server. The first thought was that there are simply too many people hitting the same functionality that updates Sales Tax Summary information &ndash; which was showing up in the call stack of the exception:<br \/>\nThe logical conclusion would be to blame this on too many folks accessing this functionality or outdated table statistics causing update statements to run too long causing others to run into that lock. It turned out to be caused by something that wasn&rsquo;t that obvious and wouldn&rsquo;t have shown up in any Exception stack traces or log files. A misconfigured timeout setting on the load balancer caused a re-execute of the original incoming web request. While the first app server was still updating the table and holding the lock &ndash; as it had a longer timeout specified as the load balancer &ndash; the second app server tried to do the same thing causing that exception.<\/p>\n<p><a href=\"http:\/\/cloudcomputing.sys-con.com\/node\/3050547\" target=\"_blank\">read more<\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-10536","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/icloud.pe\/blog\/wp-json\/wp\/v2\/posts\/10536","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/icloud.pe\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/icloud.pe\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/icloud.pe\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/icloud.pe\/blog\/wp-json\/wp\/v2\/comments?post=10536"}],"version-history":[{"count":0,"href":"https:\/\/icloud.pe\/blog\/wp-json\/wp\/v2\/posts\/10536\/revisions"}],"wp:attachment":[{"href":"https:\/\/icloud.pe\/blog\/wp-json\/wp\/v2\/media?parent=10536"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/icloud.pe\/blog\/wp-json\/wp\/v2\/categories?post=10536"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/icloud.pe\/blog\/wp-json\/wp\/v2\/tags?post=10536"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}