diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index be504871..f3144253 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -21,7 +21,7 @@ jobs:
strategy:
matrix:
# Support LTS versions based on https://nodejs.org/en/about/releases/
- node-version: ['12', '14', '16']
+ node-version: ['18', '20', '21']
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
diff --git a/.github/workflows/test-and-lint.yml b/.github/workflows/test-and-lint.yml
index 0b8cf179..5af17ca9 100644
--- a/.github/workflows/test-and-lint.yml
+++ b/.github/workflows/test-and-lint.yml
@@ -24,4 +24,3 @@ jobs:
run: npm run lint
- name: Run tests
run: npm test
-
diff --git a/README.md b/README.md
index 36064ac1..dbdcf6c3 100644
--- a/README.md
+++ b/README.md
@@ -188,6 +188,17 @@ const server = new Armadietto({
server.boot();
```
+## Lock file contention
+
+The data-access locking mechanism is lock-file based.
+
+You may need to tune the lock-file timeouts in your configuration:
+
+- *lock_timeout_ms* - millis to wait for lock file to be available
+- *lock_stale_after_ms* - millis to wait to deem lockfile stale
+
+To tune run the [hosted RS load test](https://overhide.github.io/armadietto/example/load.html) or follow instructions in [example/README.md](example/README.md) for local setup and subsequently run [example/load.html](example/load.html) off of `npm run serve` therein.
+
## Debugging an installation
Set the environment `DEBUG` to enable logging. For example `DEBUG=true armadietto -c /etc/armadietto/conf.json`
diff --git a/bin/armadietto.js b/bin/armadietto.js
index 5a51548e..f34e2549 100755
--- a/bin/armadietto.js
+++ b/bin/armadietto.js
@@ -53,7 +53,7 @@ const remoteStorageServer = {
}
process.umask(0o077);
- const store = new Armadietto.FileTree({ path: conf.storage_path });
+ const store = new Armadietto.FileTree({ path: conf.storage_path, lock_timeout_ms: conf.lock_timeout_ms, lock_stale_after_ms: conf.lock_stale_after_ms });
const server = new Armadietto({
basePath: conf.basePath,
store,
diff --git a/bin/dev-conf.json b/bin/dev-conf.json
index dc65016b..cb321c3f 100644
--- a/bin/dev-conf.json
+++ b/bin/dev-conf.json
@@ -2,6 +2,8 @@
"basePath": "",
"allow_signup": true,
"storage_path": "./dev-storage",
+ "lock_timeout_ms": 30000,
+ "lock_stale_after_ms": 60000,
"cache_views": true,
"http": {
"host": "127.0.0.1",
diff --git a/contrib/openwrt/README.md b/contrib/openwrt/README.md
index ac918498..ad99572b 100644
--- a/contrib/openwrt/README.md
+++ b/contrib/openwrt/README.md
@@ -14,7 +14,7 @@ See [TLS certificates for a server](https://openwrt.org/docs/guide-user/services
We assume that you already issued a cert
To store data you need to mount a disk.
-See [Quick Start for Adding a USB drive](https://openwrt.org/docs/guide-user/storage/usb-drives-quickstart).
+See [Quick Start for Adding a USB drive](https://openwrt.org/docs/guide-user/storage/usb-drives-quickstart).
In the example it's mounted to /mnt/disk/
Next we need to create a folder to store the user data. Login to OpenWrt with `ssh root@192.168.1.1` and execute:
diff --git a/example/index.html b/example/index.html
index 567bca91..b08c7b59 100644
--- a/example/index.html
+++ b/example/index.html
@@ -4,8 +4,8 @@