<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Mycat on Shellj的博客</title>
    <link>https://im.shellj.com/tags/mycat/</link>
    <description>Recent content in Mycat on Shellj的博客</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Tue, 12 Dec 2023 09:37:52 +0800</lastBuildDate>
    <atom:link href="https://im.shellj.com/tags/mycat/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>mycat事务超时</title>
      <link>https://im.shellj.com/posts/2017/05/mycat-transation-timeout/</link>
      <pubDate>Wed, 03 May 2017 23:30:00 +0800</pubDate>
      <guid>https://im.shellj.com/posts/2017/05/mycat-transation-timeout/</guid>
      <description>&lt;h4 id=&#34;问题&#34;&gt;问题&lt;/h4&gt;&#xA;&lt;p&gt;项目里面使用的是&lt;a href=&#34;http://mycat.io/&#34;&gt;mycat&lt;/a&gt;进行分库分表，但在最近一个系统更新后出现数据库事务锁超时的问题，如下面的错误:&lt;/p&gt;&#xA;&#xA;&lt;div class=&#34;code-block&#34;&gt;&#xA;  &#xA;  &lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Caused by: java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;h4 id=&#34;分析&#34;&gt;分析&lt;/h4&gt;&#xA;&lt;p&gt;先在网上搜索了一下之后，发现大多数说的都不是什么好的解决方案，手动kill掉事务，把事务超时时间加长，这些对我现在这个项目都不实际，还是自己分析吧。&lt;br&gt;&#xA;对数据库的配置检查了一番，没什么问题，并没有什么更新，然后就对程序进行分析，这个错误是在一次系统更新后才出现的，对这次更新进行了分析，发现频繁超时的那个更新操作去掉了一个分片id参数，比如之前是这样：&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
