Skip to content

Commit 578beef

Browse files
committed
fix/209
Closes #209 [skip ci]
1 parent d31a44a commit 578beef

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

README.md

+19-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ Supported Golang version:
3737
- [User Authentication](#user-authentication)
3838
- [Compile](#compile)
3939
- [Usage](#usage)
40-
-
4140
- [Extensions](#extensions)
4241
- [Spatialite](#spatialite)
4342
- [FAQ](#faq)
@@ -478,6 +477,25 @@ For an example see [shaxbee/go-spatialite](https://github.com/shaxbee/go-spatial
478477
479478
More infomation see [#305](https://github.com/mattn/go-sqlite3/issues/305)
480479
480+
- Error: `database is locked`
481+
482+
When you get an database is locked. Please use the following options.
483+
484+
Add to DSN: `cache=shared`
485+
486+
Example:
487+
```go
488+
db, err := sql.Open("sqlite3", "file:locked.sqlite?cache=shared")
489+
```
490+
491+
Second please set the database connections of the SQL package to 1.
492+
493+
```go
494+
db.SetMaxOpenConn(1)
495+
```
496+
497+
More information see [#209](https://github.com/mattn/go-sqlite3/issues/209)
498+
481499
# License
482500
483501
MIT: http://mattn.mit-license.org/2018

0 commit comments

Comments
 (0)