System freezes when parent and child connectivity
Asked Answered
D

1

7

I have used Pouchdb with Electron, connected two system through local LAN and using the single database which is a parent and another child system will be using the same pouchdb database.

used express-pouch to make child system to connect parent pouchdb.

There is background sync will be running in parent system from couchDB to pouchDB.

The connection is working as expected, Problem will be after some time of connection system freezes in both parent and child. checked task manager disk 100%, memory 100%.

Both System - windows 10 pro - Ram - 4GB

Dialectologist answered 18/4, 2018 at 7:28 Comment(2)
Do you have any nodejs error ?Noellenoellyn
Sometimes i will get possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit.Dialectologist
N
3

Try to increase memory allocated for your script with the option --max_old_space_size=<size>.

Try too to monitor number of emitter you have with method emitter.getMaxListeners() and emitter.listenerCount(eventName), and increase the number with emitter.setMaxListener(n)

Noellenoellyn answered 26/4, 2018 at 13:44 Comment(1)
Any other solutions ?Dialectologist

© 2022 - 2024 — McMap. All rights reserved.