Closed gvuyk closed 6 years ago
It's not clear to me what you mean with event loop is processed reaally slowly
. Have you done a chrome-profiling?
No, sorry, did the profiling now and the event loop seems ok. Its the thread pool that gets blocked.
If the amount of collections to sync is <=
4 (the default pool size) the problem goes unnoticed, increasing it to something equal or greater than the amount of collections (setting UV_THREADPOOL_SIZE
env var to 12) has the same effect
Updated the code to reproduce it
Have you observed the network? I think this is a pouchdb-thing which checks in 12 loops if the server is now reachable. Can you set retry
to false and check if the problem still occurs?
I'm closing this because it's a pouchdb/leveldb-problem which should be resolved at their repo.
It turned out to be a dns module problem, issue and workarounds
Case
Bug
Issue
I have 12 collections that need a 1 time (non-live) sync, so I pass a PouchDb instance as a 'remote' to each collection's
sync()
method. Everything works as expected except when the remote server is offline, then its like if the event loop is processed reaally slowly for a few minutes until maybe a timeout kicks in and things go back to normal. No error is reported by theRxReplicationState
sWill try to provide a test case after the weekend
Info
Code