Timeout error trying to lock table in h2

前端 未结 8 1598
无人共我
无人共我 2020-12-02 16:39

I get the following error under a certain scenario

When a different thread is populating a lot of users via the bulk upload operation and I was trying to view the li

8条回答
  •  一个人的身影
    2020-12-02 17:19

    Yes, you can change the lock timeout. The default is relatively low: 1 second (1000 ms).

    In many cases the problem is that another connection has locked the table, and using multi-version concurrency also solves the problem (append ;MVCC=true to the database URL).

    EDIT: MVCC=true param is no longer supported, because since h2 1.4.200 it's always true for a MVStore engine, which is a default engine.

提交回复
热议问题