• Recent
    • Tags
    • Popular
    • Register
    • Login

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 4 Documentation Website Mango 5 Documentation Website Radix IoT LinkedIn

    Timeout to lock table systemsettings

    Scheduled Pinned Locked Moved Mango General
    2 Posts 2 Posters 84 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Jdiaz-coJ Offline
      Jdiaz-co
      last edited by

      buenas,

      Estoy teniendo un problema. uso mango 3.7.7 y cada poco tiempo se me cae la aplicacion.

      El error que me aparece es este:

      ERROR 2025-10-27T08:26:50,187 (com.serotonin.m2m2.util.timeout.TimeoutTask.run:61) - Uncaught Task Exception
      org.springframework.dao.CannotAcquireLockException: PreparedStatementCallback; SQL [select settingValue from systemSettings where settingName=?]; Tiempo vencido intentando trabar (lock) la tabla "SYSTEMSETTINGS"
      Timeout trying to lock table "SYSTEMSETTINGS"; SQL statement:
      select settingValue from systemSettings where settingName=? [50200-199]; nested exception is org.h2.jdbc.JdbcSQLTimeoutException: Tiempo vencido intentando trabar (lock) la tabla "SYSTEMSETTINGS"

      Agradeceria cualquier ayuda.

      gracias

      1 Reply Last reply Reply Quote 0
      • joeamiragliaJ Offline
        joeamiraglia
        last edited by

        @Jdiaz-co said in Timeout to lock table systemsettings:

        hello good,

        I'm having a problem. I'm using Mango 3.7.7 and the application crashes every so often.

        The error I'm getting is this:

        ERROR 2025-10-27T08:26:50,187 (com.serotonin.m2m2.util.timeout.TimeoutTask.run:61) - Uncaught Task Exception
        org.springframework.dao.CannotAcquireLockException: PreparedStatementCallback; SQL [select settingValue from systemSettings where settingName=?]; Tiempo vencido intentando trabar (lock) la tabla "SYSTEMSETTINGS"
        Timeout trying to lock table "SYSTEMSETTINGS"; SQL statement:
        select settingValue from systemSettings where settingName=? [50200-199]; nested exception is org.h2.jdbc.JdbcSQLTimeoutException: Tiempo vencido intentando trabar (lock) la tabla "SYSTEMSETTINGS"

        I would appreciate any help.

        thank you

        Hello,

        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.

        Common causes:

        • Another process/tool (H2 console, external SQL client) connected to the same H2 DB while Mango is running.

        • Long-running DB operations (backups, purges, heavy writes) that keep the table locked.

        • Short default H2 LOCK_TIMEOUT (1s) causing normal contention to show up as errors.

        Things to try:

        • Make sure only Mango is connected to the H2 DB (no external tools while it’s running).

        • Increase H2 lock timeout in env.properties/mango.properties, e.g.
          db.url=jdbc:h2:${ma.home}/databases/mah2;LOCK_TIMEOUT=10000

        • Check logs around the crash time for other FATAL/DB errors that might be the real shutdown cause.

        If this is a production system (not just a test setup), I strongly recommend:

        • Migrating from H2 to MySQL (more robust under load and concurrency).

        • Upgrading Mango to a more recent supported version if possible, to benefit from DB and stability fixes.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post