<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Timeout to lock table systemsettings]]></title><description><![CDATA[<p dir="auto">buenas,</p>
<p dir="auto">Estoy teniendo un problema. uso mango 3.7.7 y cada poco tiempo se me cae la aplicacion.</p>
<p dir="auto">El error que me aparece es este:</p>
<p dir="auto">ERROR 2025-10-27T08:26:50,187 (com.serotonin.m2m2.util.timeout.TimeoutTask.run:61) - Uncaught Task Exception<br />
org.springframework.dao.CannotAcquireLockException: PreparedStatementCallback; SQL [select settingValue from systemSettings where settingName=?]; Tiempo vencido intentando trabar (lock) la tabla "SYSTEMSETTINGS"<br />
Timeout trying to lock table "SYSTEMSETTINGS"; SQL statement:<br />
select settingValue from systemSettings where settingName=? [50200-199]; nested exception is org.h2.jdbc.JdbcSQLTimeoutException: Tiempo vencido intentando trabar (lock) la tabla "SYSTEMSETTINGS"</p>
<p dir="auto">Agradeceria cualquier ayuda.</p>
<p dir="auto">gracias</p>
]]></description><link>https://forum.mango-os.com/topic/6155/timeout-to-lock-table-systemsettings</link><generator>RSS for Node</generator><lastBuildDate>Tue, 12 May 2026 18:07:13 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/6155.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 27 Oct 2025 08:43:57 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Timeout to lock table systemsettings on Fri, 21 Nov 2025 13:00:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jdiaz-co" aria-label="Profile: Jdiaz-co">@<bdi>Jdiaz-co</bdi></a> said in <a href="/post/28605">Timeout to lock table systemsettings</a>:</p>
<blockquote>
<p dir="auto">hello good,</p>
<p dir="auto">I'm having a problem. I'm using Mango 3.7.7 and the application crashes every so often.</p>
<p dir="auto">The error I'm getting is this:</p>
<p dir="auto">ERROR 2025-10-27T08:26:50,187 (com.serotonin.m2m2.util.timeout.TimeoutTask.run:61) - Uncaught Task Exception<br />
org.springframework.dao.CannotAcquireLockException: PreparedStatementCallback; SQL [select settingValue from systemSettings where settingName=?]; Tiempo vencido intentando trabar (lock) la tabla "SYSTEMSETTINGS"<br />
Timeout trying to lock table "SYSTEMSETTINGS"; SQL statement:<br />
select settingValue from systemSettings where settingName=? [50200-199]; nested exception is org.h2.jdbc.JdbcSQLTimeoutException: Tiempo vencido intentando trabar (lock) la tabla "SYSTEMSETTINGS"</p>
<p dir="auto">I would appreciate any help.</p>
<p dir="auto">thank you</p>
</blockquote>
<p dir="auto">Hello,</p>
<p dir="auto">This error comes from the embedded H2 database: something is holding a lock on the SYSTEMSETTINGS table too long, so reads (like select settingValue from systemSettings…) time out and throw CannotAcquireLockException.</p>
<p dir="auto">Common causes:</p>
<ul>
<li>
<p dir="auto">Another process/tool (H2 console, external SQL client) connected to the same H2 DB while Mango is running.</p>
</li>
<li>
<p dir="auto">Long-running DB operations (backups, purges, heavy writes) that keep the table locked.</p>
</li>
<li>
<p dir="auto">Short default H2 LOCK_TIMEOUT (1s) causing normal contention to show up as errors.</p>
</li>
</ul>
<p dir="auto">Things to try:</p>
<ul>
<li>
<p dir="auto">Make sure only Mango is connected to the H2 DB (no external tools while it’s running).</p>
</li>
<li>
<p dir="auto">Increase H2 lock timeout in env.properties/mango.properties, e.g.<br />
db.url=jdbc:h2:${ma.home}/databases/mah2;LOCK_TIMEOUT=10000</p>
</li>
<li>
<p dir="auto">Check logs around the crash time for other FATAL/DB errors that might be the real shutdown cause.</p>
</li>
</ul>
<p dir="auto">If this is a production system (not just a test setup), I strongly recommend:</p>
<ul>
<li>
<p dir="auto">Migrating from H2 to MySQL (more robust under load and concurrency).</p>
</li>
<li>
<p dir="auto">Upgrading Mango to a more recent supported version if possible, to benefit from DB and stability fixes.</p>
</li>
</ul>
]]></description><link>https://forum.mango-os.com/post/28623</link><guid isPermaLink="true">https://forum.mango-os.com/post/28623</guid><dc:creator><![CDATA[joeamiraglia]]></dc:creator><pubDate>Fri, 21 Nov 2025 13:00:46 GMT</pubDate></item></channel></rss>