Simple Concurrent Testing of SQLite3

Concurrency read/write test on SQLite3 at the application level with default configuration

Test Environment

  • SQLite3
  • Default configuration
  • Spring Boot, JDBC/Hikari

Write Test

5 threads continuously writing

  • JDBC single dataSource: Error SQLERROR 5
  • Hikari connection pool size set to 1: No error
  • Hikari connection pool size set to >=2: Error SQLERROR 5

Read Test

  • Hikari connection pool size 50, 150 threads, each thread reads 300 entries: No error

Explanation of SQLERROR 5

File write lock conflict

© api2o.com:: a website of blog, tools, APIs. 一个包含: 博客、在线工具、API 的网站. All rights reserved.