This repository was archived by the owner on Jun 12, 2024. It is now read-only.
This repository was archived by the owner on Jun 12, 2024. It is now read-only.
Import "database is locked (5) (SQLITE_BUSY)" errors #906
Open
Description
First Check
- This is not a feature request
- I added a very descriptive title to this issue.
- I used the GitHub search to find a similar issue and didn't find it.
- I searched the documentation, with the integrated search. (there is no search?)
- I already read the docs and didn't find an answer.
Homebox Version
0.10.3
What is the issue you are experiencing?
When importing a CSV file with about 40-50 items, the whole file gets parsed, but the actual import is often terminated prematurely by a "database is locked (5) (SQLITE_BUSY)" error. If every line has an import_ref it's OK to try to import repeatedly, and eventually you'll get most if not all of it imported.
homebox | 9:48PM DBG go/src/app/internal/core/services/reporting/io_sheet.go:125 > parsed value tag=HB.model_number type=string val=
homebox | 9:48PM DBG go/src/app/internal/core/services/reporting/io_sheet.go:125 > parsed value tag=HB.serial_number type=string val=
homebox | 9:48PM DBG go/src/app/internal/core/services/reporting/io_sheet.go:125 > parsed value tag=HB.lifetime_warranty type=bool val=false
homebox | 9:48PM DBG go/src/app/internal/core/services/reporting/io_sheet.go:125 > parsed value tag=HB.warranty_expires type=types.Date val=
homebox | 9:48PM DBG go/src/app/internal/core/services/reporting/io_sheet.go:125 > parsed value tag=HB.warranty_details type=string val=
homebox | 9:48PM DBG go/src/app/internal/core/services/reporting/io_sheet.go:125 > parsed value tag=HB.sold_to type=string val=
homebox | 9:48PM DBG go/src/app/internal/core/services/reporting/io_sheet.go:125 > parsed value tag=HB.sold_price type=float64 val=0
homebox | 9:48PM DBG go/src/app/internal/core/services/reporting/io_sheet.go:125 > parsed value tag=HB.sold_time type=types.Date val=
homebox | 9:48PM DBG go/src/app/internal/core/services/reporting/io_sheet.go:125 > parsed value tag=HB.sold_notes type=string val=
homebox | 9:48PM INF go/src/app/internal/web/mid/logger.go:36 > request received method=GET path=/api/v1/locations rid=dfe4f17e0746/WDBFajZi5D-000089
homebox | 9:48PM INF go/src/app/internal/web/mid/logger.go:36 > request received method=GET path=/api/v1/locations rid=dfe4f17e0746/WDBFajZi5D-000090
homebox | 9:48PM INF go/src/app/internal/web/mid/logger.go:41 > request finished method=GET path=/api/v1/locations rid=dfe4f17e0746/WDBFajZi5D-000089 status=200
homebox | 9:48PM ERR go/src/app/app/api/handlers/v1/v1_ctrl_items.go:265 > failed to import items error="database is locked (5) (SQLITE_BUSY)"
homebox | 9:48PM ERR go/src/app/internal/web/mid/errors.go:31 > ERROR occurred error="database is locked (5) (SQLITE_BUSY)" req_id=dfe4f17e0746/WDBFajZi5D-000088
How can the maintainer reproduce the issue?
Generate an inventory CSV with about 40-50 items. (Sorry I cannot share mine, it's actually based on an export of my work snipe-it.) Import while looking at the logs. On the browser you'll get an "import failed" as well as "import success" message, while in the logs you'll see some number of SQLITE_BUSY errors.
Deployment
Docker (Linux)
Deployment Details
Rootless container, directory for the /data volume. Using basically the suggested docker-compose file.