<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Doing some more research I see that RT using Oracle used to use File Sesssions and switched in 4.2 to using Oracle. Then a change was made to make sessions default to the MaxAttachment size which, from reading DBD::Oracle documentation, could trigger FOR UPDATE being used causing the locking issue.<div><br></div><div>I guess the answer for me is to just use Apache Sesssion Files. </div><div><br></div><div>I would be happy to test any solutions for using Oracle for sessions on my devel instance but don’t want to hold up my upgrade any longer. <br><div><br class="webkit-block-placeholder"></div><div apple-content-edited="true">
<div style="color: rgb(0, 0, 0); font-family: Helvetica;  font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">The two commits in question</div><div style="color: rgb(0, 0, 0); font-family: Helvetica;  font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span style="orphans: auto; widows: auto;"><a href="https://github.com/bestpractical/rt/commit/36be526fecd2efb82762bb64978e39381d4a7622">https://github.com/bestpractical/rt/commit/36be526fecd2efb82762bb64978e39381d4a7622</a></span></div><div style="orphans: 2; text-align: -webkit-auto; text-indent: 0px; widows: 2;"><div style="orphans: auto; widows: auto;"><a href="https://github.com/bestpractical/rt/commit/fd66493495acde6a321fd3e560a01002284a198b">https://github.com/bestpractical/rt/commit/fd66493495acde6a321fd3e560a01002284a198b</a></div><div style="orphans: auto; widows: auto;"><br></div><div style="orphans: auto; widows: auto;">I did confirm this bug occurs against a 10g and 11g Oracle database using 4.2</div><div style="orphans: auto; widows: auto;"><br></div>--</div><div style="color: rgb(0, 0, 0); font-family: Helvetica;  font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">Shawn Plummer</div><div style="color: rgb(0, 0, 0); font-family: Helvetica;  font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">Systems Manager | SUNY Geneseo</div><div style="color: rgb(0, 0, 0); font-family: Helvetica;  font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">South Hall 119 | 585-245-5577 | <a href="http://www.geneseo.edu/cit">http://www.geneseo.edu/cit</a></div>
</div>
<br><div><div>On Jul 29, 2014, at 10:49 AM, Shawn Plummer <<a href="mailto:plummer@geneseo.edu">plummer@geneseo.edu</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=windows-1252"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">I have done some more digging and am unable to determine the code causing the FOR UPDATE to be issued.<div><br></div><div>Does anyone have rt 4.2.x running against Oracle successfully?<br><div apple-content-edited="true">
<div style="font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class="Apple-interchange-newline">--</div><div style="font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Shawn Plummer</div><div style="font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Systems Manager | SUNY Geneseo</div><div style="font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;">South Hall 119 | 585-245-5577 | <a href="http://www.geneseo.edu/cit">http://www.geneseo.edu/cit</a></div>
</div>
<br><div><div>On Jun 24, 2014, at 4:24 PM, Alex Vandiver <<a href="mailto:alexmv@bestpractical.com">alexmv@bestpractical.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">On 06/24/2014 04:03 PM, Shawn Plummer wrote:<br><blockquote type="cite">[snip]<br></blockquote><br>Please keep replies on-list.<br> - Alex<br><br><blockquote type="cite"><blockquote type="cite">Sounds like it's indeed related to session locking.  You can try<br>switching to on-disk sessions and see if it resolves the issue:<br><br>   Set($WebSessionClass, "Apache::Session::File”);<br><br></blockquote>Running this way did indeed prevent the error from occurring. We<br>switched back to database sessions to perform more testing.<br><br><blockquote type="cite">However, we'd also be interested to hear what your DBA discovers about<br>the deadlocks, as this issue may well bite other Oracle users, and we'd<br>like to resolve it.<br></blockquote><br>Our DBA has been doing some research and believes FOR UPDATE in this<br>statement is the issue<br><br>SELECT a_session<br>FROM sessions<br>WHERE id = :p1 FOR UPDATE<br><br>From Oracle Doc:<br>How Oracle Database Locks Data<br><br>Locks are mechanisms that prevent destructive interaction between<br>transactions accessing the same resource—either user objects such as<br>tables and rows or system objects not visible to users, such as shared<br>data structures in memory and data dictionary rows.<br><br>In all cases, Oracle Database automatically obtains necessary locks when<br>executing SQL statements, so users need not be concerned with such<br>details. Oracle Database automatically uses the lowest applicable level<br>of restrictiveness to provide the highest degree of data concurrency yet<br>also provide fail-safe data integrity. Oracle Database also allows the<br>user to lock data manually.<br><br>More<br>details: <a href="http://docs.oracle.com/cd/B28359_01/server.111/b28318/consist.htm#CNCPT020">http://docs.oracle.com/cd/B28359_01/server.111/b28318/consist.htm#CNCPT020</a><br><br>There is also a doc showing that SELECT FOR UPDATE behavior is different<br>from 10g to 11g. Doc ID 858518.1<br><br>And further information on FOR<br>UPDATE <a href="http://markjbobak.wordpress.com/2010/04/06/unintended-consequences/">http://markjbobak.wordpress.com/2010/04/06/unintended-consequences/</a><br><br><br>--<br>Shawn Plummer<br>Systems Manager | SUNY Geneseo<br>South Hall 119 | 585-245-5577 | <a href="http://www.geneseo.edu/cit">http://www.geneseo.edu/cit</a><br><br></blockquote><br></blockquote></div><br></div></div></blockquote></div><br></div></body></html>