Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

System freezes when parent and child connectivity

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

like image 557
Jeevan Avatar asked Apr 18 '18 07:04

Jeevan


1 Answers

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)

like image 95
Nicolas Frbezar Avatar answered Sep 22 '22 22:09

Nicolas Frbezar