Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report [SQLITE_BUSY] The database file is locked (database is locked). for some times just after the server launched #288

Closed
3 tasks done
yqs112358 opened this issue Aug 7, 2024 · 1 comment · Fixed by #282
Labels
bug Something isn't working

Comments

@yqs112358
Copy link

Expected behavior

No error report when the server is launched.

Observed/actual behavior

When the server has just finished booting up, the following error is often reported continuously:

[08:00:59] [DefaultDispatcher-worker-13/WARN]: Transaction attempt #1 failed: org.sqlite.SQLiteException: [SQLITE_BUSY] The database file is locked (database is locked). Statement(s): UPDATE players SET last_join=? WHERE id = ?
>org.jetbrains.exposed.exceptions.ExposedSQLException: org.sqlite.SQLiteException: [SQLITE_BUSY] The database file is locked (database is locked)
at org.jetbrains.exposed.sql.statements.Statement.executeIn$exposed_core(Statement.kt:94) ~[ledger-1.3.4+local.jar:?]
at org.jetbrains.exposed.sql.Transaction.exec(Transaction.kt:244) ~[ledger-1.3.4+local.jar:?]
at org.jetbrains.exposed.sql.Transaction.exec(Transaction.kt:221) ~[ledger-1.3.4+local.jar:?]
at org.jetbrains.exposed.sql.statements.Statement.execute(Statement.kt:55) ~[ledger-1.3.4+local.jar:?]
at org.jetbrains.exposed.dao.EntityBatchUpdate.execute(EntityBatchUpdate.kt:33) ~[ledger-1.3.4+local.jar:?]
at org.jetbrains.exposed.dao.EntityCache$updateEntities$2$2.invoke(EntityCache.kt:120) ~[ledger-1.3.4+local.jar:?]
at org.jetbrains.exposed.dao.EntityCache$updateEntities$2$2.invoke(EntityCache.kt:119) ~[ledger-1.3.4+local.jar:?]
at org.jetbrains.exposed.dao.EntityLifecycleInterceptorKt.executeAsPartOfEntityLifecycle(EntityLifecycleInterceptor.kt:18) ~[ledger-1.3.4+local.jar:?]
at org.jetbrains.exposed.dao.EntityCache.updateEntities(EntityCache.kt:119) ~[ledger-1.3.4+local.jar:?]
at org.jetbrains.exposed.dao.EntityCache.flush(EntityCache.kt:141) ~[ledger-1.3.4+local.jar:?]
at org.jetbrains.exposed.dao.EntityCache.flush(EntityCache.kt:106) ~[ledger-1.3.4+local.jar:?]
at org.jetbrains.exposed.dao.EntityCacheKt.flushCache(EntityCache.kt:242) ~[ledger-1.3.4+local.jar:?]
at org.jetbrains.exposed.dao.EntityLifecycleInterceptor.beforeCommit(EntityLifecycleInterceptor.kt:86) ~[ledger-1.3.4+local.jar:?]
at org.jetbrains.exposed.sql.Transaction.commit(Transaction.kt:124) ~[ledger-1.3.4+local.jar:?]
at org.jetbrains.exposed.sql.transactions.experimental.SuspendedKt$suspendedTransactionAsyncInternal$1.invokeSuspend(Suspended.kt:188) [ledger-1.3.4+local.jar:?]
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) [org_jetbrains_kotlin_kotlin-stdlib-2.0.0-e823d47a24b16be4.jar:?]
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104) [org_jetbrains_kotlinx_kotlinx-coe-jvm-1.8.1-682b081a811ff4e1.jar:?]
at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111) [org_jetbrains_kotlinx_kotlinx-coe-jvm-1.8.1-682b081a811ff4e1.jar:?]
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99) [org_jetbrains_kotlinx_kotlinx-coe-jvm-1.8.1-682b081a811ff4e1.jar:?]
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584) [org_jetbrains_kotlinx_kotlinx-coe-jvm-1.8.1-682b081a811ff4e1.jar:?]
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:811) [org_jetbrains_kotlinx_kotlinx-coe-jvm-1.8.1-682b081a811ff4e1.jar:?]
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:715) [org_jetbrains_kotlinx_kotlinx-coe-jvm-1.8.1-682b081a811ff4e1.jar:?]
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:702) [org_jetbrains_kotlinx_kotlinx-coe-jvm-1.8.1-682b081a811ff4e1.jar:?]
>Caused by: org.sqlite.SQLiteException: [SQLITE_BUSY] The database file is locked (database is locked)
at org.sqlite.core.DB.newSQLException(DB.java:1179) ~[ledger-1.3.4+local.jar:?]
at org.sqlite.core.DB.newSQLException(DB.java:1190) ~[ledger-1.3.4+local.jar:?]
at org.sqlite.core.DB.execute(DB.java:985) ~[ledger-1.3.4+local.jar:?]
at org.sqlite.core.DB.executeUpdate(DB.java:1054) ~[ledger-1.3.4+local.jar:?]
at org.sqlite.jdbc3.JDBC3PreparedStatement.lambda$executeLargeUpdate$2(JDBC3PreparedStatement.java:122) ~[ledger-1.3.4+local.jar:?]
at org.sqlite.jdbc3.JDBC3Statement.withConnectionTimeout(JDBC3Statement.java:459) ~[ledger-1.3.4+local.jar:?]
at org.sqlite.jdbc3.JDBC3PreparedStatement.executeLargeUpdate(JDBC3PreparedStatement.java:121) ~[ledger-1.3.4+local.jar:?]
at org.sqlite.jdbc3.JDBC3PreparedStatement.executeUpdate(JDBC3PreparedStatement.java:102) ~[ledger-1.3.4+local.jar:?]
at org.jetbrains.exposed.sql.statements.jdbc.JdbcPreparedStatementImpl.executeUpdate(JdbcPreparedStatementImpl.kt:55) ~[ledger-1.3.4+local.jar:?]
at org.jetbrains.exposed.sql.statements.BatchUpdateStatement.executeInternal(BatchUpdateStatement.kt:51) ~[ledger-1.3.4+local.jar:?]
at org.jetbrains.exposed.sql.statements.BatchUpdateStatement.executeInternal(BatchUpdateStatement.kt:17) ~[ledger-1.3.4+local.jar:?]
at org.jetbrains.exposed.sql.statements.Statement.executeIn$exposed_core(Statement.kt:92) ~[ledger-1.3.4+local.jar:?]
... 22 more
[08:00:59] [DefaultDispatcher-worker-13/WARN]: Wait 85316 milliseconds before retrying

Steps/models to reproduce

Maybe this is a conflict caused by creating multiple connections to sqlite db at the same time?

What operating system are you running

Windows

Minecraft version

1.21

Ledger version

1.3.4

Logs

Attached before.

Agreements

  • I am running the latest version of the mod.
  • My version of Minecraft is supported.
  • I have searched for and ensured there isn't already an open issue regarding this.

Other

No response

@yqs112358 yqs112358 added the bug Something isn't working label Aug 7, 2024
@yqs112358
Copy link
Author

seems to be fixed in #282

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant