Skip to content
This repository has been archived by the owner on Jun 28, 2023. It is now read-only.

Commit

Permalink
Merge pull request #85 from matrix-org/kegan/database-is-locked
Browse files Browse the repository at this point in the history
Edit README to put `_busy_timeout` to fix database is locked errors (#63)
  • Loading branch information
kegsay authored Oct 13, 2016
2 parents d9da3ca + 95521a0 commit 7bcffa4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Clone and run (Requires Go 1.5+ and GB):

```bash
gb build github.com/matrix-org/go-neb
BIND_ADDRESS=:4050 DATABASE_TYPE=sqlite3 DATABASE_URL=go-neb.db BASE_URL=http://localhost:4050 bin/go-neb
BIND_ADDRESS=:4050 DATABASE_TYPE=sqlite3 DATABASE_URL=go-neb.db?_busy_timeout=5000 BASE_URL=http://localhost:4050 bin/go-neb
```

Get a Matrix user ID and access token and give it to Go-NEB:
Expand Down Expand Up @@ -92,11 +92,11 @@ gb build github.com/matrix-org/go-neb
# Running
Go-NEB uses environment variables to configure its SQLite database and bind address. To run Go-NEB, run the following command:
```bash
BIND_ADDRESS=:4050 DATABASE_TYPE=sqlite3 DATABASE_URL=go-neb.db BASE_URL=https://public.facing.endpoint bin/go-neb
BIND_ADDRESS=:4050 DATABASE_TYPE=sqlite3 DATABASE_URL=go-neb.db?_busy_timeout=5000 BASE_URL=https://public.facing.endpoint bin/go-neb
```
- `BIND_ADDRESS` is the port to listen on.
- `DATABASE_TYPE` MUST be "sqlite3". No other type is supported.
- `DATABASE_URL` is where to find the database file. One will be created if it does not exist.
- `DATABASE_URL` is where to find the database file. One will be created if it does not exist. It is a URL so parameters can be passed to it. We recommend setting `_busy_timeout=5000` to prevent sqlite3 "database is locked" errors.
- `BASE_URL` should be the public-facing endpoint that sites like Github can send webhooks to.

Go-NEB needs to be "configured" with clients and services before it will do anything useful.
Expand Down

0 comments on commit 7bcffa4

Please sign in to comment.