apache / apache/pouchdb

Changes Stop Emitting

Open
#8,608 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
17.6k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

### Issue
When waiting for changes, after a period of approximately 20 minutes change events stop emitting.

### Info
- Environment: Node.js 16.x
- Platform: Windows
- Adapter: leveldb
- Server: PouchDB via pouhdb-node

### Reproduce
Here's the code. It fires fine for all changes received once the app is started (it's an express web app) but after a period of approximately 20 minutes of inactivity the change event no longer fires and seemingly goes dormant:

global.db.changes({live: true, include_docs: true})

.on("change", function(change)
{ console.log("DB change: ", change);
})
.on("complete", function(info)
{ console.log("Changes listener was cancelled: ", info);
})
.on("error", function(err)
{ console.log("Changes listener encountered an error: ", err);
})

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.