<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        mso-fareast-language:EN-GB;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D;mso-fareast-language:EN-US">Hi Fran,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D;mso-fareast-language:EN-US">A couple of things to look at:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D;mso-fareast-language:EN-US">In ~/perl_lib/EPrints/Database/mysql.pm, do you have a line that references 'optimizer_search_depth'?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D;mso-fareast-language:EN-US">If not, this might be useful: https://github.com/eprints/eprints/issues/120<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D;mso-fareast-language:EN-US">If you already have that, what about the storage engines the tables are using?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D;mso-fareast-language:EN-US">MyISAM uses table-level locking, but InnoDB use row-level locking.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D;mso-fareast-language:EN-US">I did some investigations a while ago, and found that some queries that looked like they shouldn't lock a table were doing so for some
 reason (I cannot recall the exact details - but I don't think it's an 'eprints' thing - I could recreate the scenario in the DB directly).<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D;mso-fareast-language:EN-US">Any of that help?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D;mso-fareast-language:EN-US">Cheers,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D;mso-fareast-language:EN-US">John<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"> eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk]
<b>On Behalf Of </b>Fran Callaghan via Eprints-tech<br>
<b>Sent:</b> 14 February 2019 14:50<br>
<b>To:</b> eprints-tech@ecs.soton.ac.uk<br>
<b>Subject:</b> [EP-tech] New system, crashing periodically b/c MySQL Locking<o:p></o:p></span></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal">Hi Everybody,<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">We have a (reasonably) new install that has been grinding to a halt every week or two. When I look at 'top' on the command line (Red Hat) mysqld is hogging 100% CPU. When I use mysqladmin processlist I can see a number of sessions queuing
 behind this...<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:10.0pt;line-height:115%"><span lang="EN" style="font-size:11.0pt;line-height:115%;font-family:&quot;Calibri&quot;,sans-serif">| 104558 | doras | localhost | doras | Query&nbsp;&nbsp; | 1587 | statistics&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | INSERT INTO
 `cache17312`(`pos`, `eprintid`) SELECT @i:=@i&#43;1, `eprintid` FROM (SELECT `eprint`.`eprin | 0.000&nbsp;&nbsp;&nbsp; |</span><span style="font-size:11.0pt;line-height:115%;font-family:&quot;Calibri&quot;,sans-serif"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:10.0pt;line-height:115%"><span lang="EN" style="font-size:11.0pt;line-height:115%;font-family:&quot;Calibri&quot;,sans-serif">The other processes (queued) are all waiting for table level lock and look like this...</span><span style="font-size:11.0pt;line-height:115%;font-family:&quot;Calibri&quot;,sans-serif"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:10.0pt;line-height:115%"><span style="font-size:11.0pt;line-height:115%;font-family:&quot;Calibri&quot;,sans-serif"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="margin-bottom:10.0pt;line-height:115%"><span lang="EN" style="font-size:11.0pt;line-height:115%;font-family:&quot;Calibri&quot;,sans-serif">| 105134 | doras | localhost | doras | Query&nbsp;&nbsp; | 487&nbsp; | Waiting for table level lock | UPDATE `eprint`
 SET `edit_lock_user`='1037', `edit_lock_since`='1550139932', `edit_lock_until`='1550 | 0.000&nbsp;&nbsp;&nbsp; |</span><span style="font-size:11.0pt;line-height:115%;font-family:&quot;Calibri&quot;,sans-serif"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:10.0pt;line-height:115%"><span lang="EN" style="font-size:11.0pt;line-height:115%;font-family:&quot;Calibri&quot;,sans-serif">| 105135 | doras | localhost | doras | Query&nbsp;&nbsp; | 486&nbsp; | Waiting for table level lock | SELECT `eprintid`,`rev_number`,`eprint_status`,`userid`,`importid`,`source`,`dir`,`datestamp_year`,`
 | 0.000&nbsp;&nbsp;</span><span style="font-size:11.0pt;line-height:115%;font-family:&quot;Calibri&quot;,sans-serif"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:10.0pt;line-height:115%"><span style="font-size:11.0pt;line-height:115%;font-family:&quot;Calibri&quot;,sans-serif"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="margin-bottom:10.0pt;line-height:115%"><span lang="EN" style="font-size:11.0pt;line-height:115%;font-family:&quot;Calibri&quot;,sans-serif">Eventually the max http processes is reached and the system crashes. The only remedy is to restart
 httpd and mariadb.</span><span style="font-size:11.0pt;line-height:115%;font-family:&quot;Calibri&quot;,sans-serif"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:10.0pt;line-height:115%"><span style="font-size:11.0pt;line-height:115%;font-family:&quot;Calibri&quot;,sans-serif"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="margin-bottom:10.0pt;line-height:115%"><span lang="EN" style="font-size:11.0pt;line-height:115%;font-family:&quot;Calibri&quot;,sans-serif">Any ideas what this insert into cache is and why it's locking the the system?</span><span style="font-size:11.0pt;line-height:115%;font-family:&quot;Calibri&quot;,sans-serif"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:10.0pt;line-height:115%"><span lang="EN" style="font-size:11.0pt;line-height:115%;font-family:&quot;Calibri&quot;,sans-serif">Thanks for any guidance</span><span style="font-size:11.0pt;line-height:115%;font-family:&quot;Calibri&quot;,sans-serif"><o:p></o:p></span></p>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal">Fran Callaghan<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Dublin City University<o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p style="background:white"><b><i><span style="font-size:7.5pt;font-family:&quot;Verdana&quot;,sans-serif;color:#929292">Séanadh Ríomhphoist/Email Disclaimer</span></i></b><i><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></i></p>
<p style="background:white"><b><i><span style="font-size:7.5pt;font-family:&quot;Verdana&quot;,sans-serif;color:#929292">Tá an ríomhphost seo agus aon chomhad a sheoltar leis faoi rún agus is lena úsáid ag an seolaí agus sin amháin é.
<a href="https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww4.dcu.ie%2Fiss%2Fseanadh-riomhphoist.shtml&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cf0d6d6cec0d2498f630908d692911ac8%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&amp;sdata=cxaNhEyQ4ARfTrV8n6pLkQNLFY4D5mNznKlyKqDbSR8%3D&amp;reserved=0" originalSrc="https://www4.dcu.ie/iss/seanadh-riomhphoist.shtml" shash="eSdG1xwXMKbcHr8c8spsneUpTuDATlYCzOxhTbaj7+1OVMHi9JBxFe/HABU7w5s7MOEPC6y6/yED4egE+rIGwwcNfAhYQMHylth64wSlkRiIzSajah0XRBZnbQ8VWLzkFLZuqzLhk57dsk8or4KpF++aBCiEI1m+Rmh19tsoXos=" target="_blank">
Is féidir tuilleadh a léamh anseo.&nbsp;</a></span></i></b><i><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></i></p>
<p style="background:white"><b><i><span style="font-size:7.5pt;font-family:&quot;Verdana&quot;,sans-serif;color:#929292">This e-mail and any files transmitted with it are confidential and are intended solely for use by the addressee.
<a href="https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww4.dcu.ie%2Fiss%2Femail-disclaimer.shtml&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cf0d6d6cec0d2498f630908d692911ac8%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&amp;sdata=gwxFEeE2ouXqh99%2FNiubE3Fel2bdIC1LlzRRvBQp1u4%3D&amp;reserved=0" originalSrc="https://www4.dcu.ie/iss/email-disclaimer.shtml" shash="KjO/5jyfWnR1IO+19PHbODGuEe4M0h5GTJ9Z1TGwbJG0lVahNuusfYf9I09pGPaidvKeYbwg73btDfrkCEtA02cDdy9MNyHcS+ArGWwnnHqGVSIabGm3PUpp/TFVFK8UP6sozQCssYLT3DqzvVh6I8SIuAp82wGgOGwLI5gomYc=" target="_blank">
Read more here.</a></span></i></b><i><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></i></p>
<div>
<pre style="background:white"><i><span style="font-size:7.5pt;font-family:&quot;Verdana&quot;,sans-serif;color:#929292"><o:p>&nbsp;</o:p></span></i></pre>
</div>
<div>
<pre style="background:white"><i><span style="font-size:7.5pt;font-family:&quot;Verdana&quot;,sans-serif;color:#929292"><o:p>&nbsp;</o:p></span></i></pre>
</div>
<p class="MsoNormal"><br>
<span style="border:solid windowtext 1.0pt;padding:0cm"><img border="0" width="100" height="100" id="_x0000_i1025" src="cid:~WRD358.jpg" alt="Image removed by sender."></span><o:p></o:p></p>
<div>
<p class="MsoNormal"><a href="https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.facebook.com%2FDCU%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cf0d6d6cec0d2498f630908d692911ac8%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&amp;sdata=SGpNapmgJ13Foz2bKoxkIJ2G9lXpaUZ8UAdYF8%2FGMOA%3D&amp;reserved=0" originalSrc="https://www.facebook.com/DCU/" shash="z+P/Uma96hBgVig8UkhjGV3KdOWoVfWwoqn2XOPXrHhhnCfY9QNOd+v7SIqkCsU1xsPvq/qlo3e3/GmkGecOkygtgdiLA/gDhuLtw3+4ke2b/wLfTSFO8leZ2RSZyFw6DZxf9FiEe9ItG3rSp6cZ149lQqvkdu3NdGOTLIkvsZ4=" target="_blank"><span style="border:solid windowtext 1.0pt;padding:0cm;text-decoration:none"><img border="0" width="100" height="100" id="_x0000_i1026" src="cid:~WRD358.jpg" alt="Image removed by sender."></span></a><a href="https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftwitter.com%2FDublinCityUni&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cf0d6d6cec0d2498f630908d692911ac8%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&amp;sdata=IucrkZ5QmuDb4FQ%2BRQwix2OQ7Qbl8qwcYZ82AHdTMFM%3D&amp;reserved=0" originalSrc="https://twitter.com/DublinCityUni" shash="RT6CCIcymzC0AFcVO0PvTxJph3emk27CMm+GDr3sCcYQasO5BIL4k0pMm62DzzWLgq7mS5uFXs4uh2WnUsgzpXMJGw6by1pa/9tFyrxtW3b38YpDJGFsesxoUSF5jVJRhFFCFLKOY10z9+51fBfOUx8ctFLRzqJiECcqeeQ0aoU=" target="_blank"><span style="border:solid windowtext 1.0pt;padding:0cm;text-decoration:none"><img border="0" width="100" height="100" id="_x0000_i1027" src="cid:~WRD358.jpg" alt="Image removed by sender."></span></a><a href="https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.linkedin.com%2Fcompany%2Fdublin-city-university&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cf0d6d6cec0d2498f630908d692911ac8%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&amp;sdata=o7kWkgfshghFiIcOeZ9WTbvvlZDQaKXJ6uyj7ycojLQ%3D&amp;reserved=0" originalSrc="https://www.linkedin.com/company/dublin-city-university" shash="G6zw03iXlDDXZdZEBYlLcZwMK/0Mc9jfUFviDZIArnR8HYmiZj9pIJlW8fglrNDekXsQdzGzGDfoZN0MkN/KGsvRjM6sXUiZn4lMdIa/x1mrl7Sf5IHN+Gd/HXfMPSEHLiquNpu6wKiY/9vYc6Mtvs/5Y6gSYuKoW6jAwAekSIM=" target="_blank"><span style="border:solid windowtext 1.0pt;padding:0cm;text-decoration:none"><img border="0" width="100" height="100" id="_x0000_i1028" src="cid:~WRD358.jpg" alt="Image removed by sender."></span></a><a href="https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.instagram.com%2Fdublincityuniversity%2F%3Fhl%3Den&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cf0d6d6cec0d2498f630908d692911ac8%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&amp;sdata=KonMRDY%2BTJ3KrUbF7rOlZbRf6y%2F%2FcMiGQfl1wxS3tKc%3D&amp;reserved=0" originalSrc="https://www.instagram.com/dublincityuniversity/?hl=en" shash="rLnYqrYs/ujPSpu2Zx7gsZ0/c6ngBxoFbBQDgaibw7r3OmJV1aniJHWW/7BuqcrhMpZRoAO7DdrVCVCfXoVz8zxuuqoyrpxsVkpqpxC9F0Fc0rcGtpr7DeiaZny5+P6HRz8lpobQ7vYFPH09e/S5WPEFknya8qRmoFQRMdyBU7w=" target="_blank"><span style="border:solid windowtext 1.0pt;padding:0cm;text-decoration:none"><img border="0" width="100" height="100" id="_x0000_i1029" src="cid:~WRD358.jpg" alt="Image removed by sender."></span></a><a href="https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.youtube.com%2Fuser%2FDublinCityUniversity&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cf0d6d6cec0d2498f630908d692911ac8%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&amp;sdata=w49RTSUafp2WGxHDMtmz%2F0adntw9ZwRtI35d%2BEdXhQk%3D&amp;reserved=0" originalSrc="https://www.youtube.com/user/DublinCityUniversity" shash="MK5/5dOVPgzRwrEmL2VhNx1DdR+zqMy5VzMT72GO0dRllYPazd543O2Md0KoRVoa0sVr5y119GOHr1KLmgaeFg51AmR27Smr/6kmMgyztRRfZsjOgh9ypb6tTgriu7HURQDnS+NNiB910jg4KoFzwdoG/dCC9SbOLu8ZnzK1O5U=" target="_blank"><span style="border:solid windowtext 1.0pt;padding:0cm;text-decoration:none"><img border="0" width="100" height="100" id="_x0000_i1030" src="cid:~WRD358.jpg" alt="Image removed by sender."></span></a><o:p></o:p></p>
</div>
</div>
</body>
</html>