pelias / wof-admin-lookup

Who's on First Admin Lookup for the Pelias Geocoder
https://pelias.io
MIT License
9 stars 24 forks source link

If any worker process dies all future admin lookup attempts will hang #138

Closed orangejulius closed 7 years ago

orangejulius commented 7 years ago

This project works by having a leader process with several worker processes, and communication between them. Each worker process has quite a bit of data in memory. Currently, when a request to do an admin lookup comes in, the leader process will send a message to all relevant workers and wait for a response.

If any worker process has died for any reason (such as running out of memory, being stopped manually, etc), the leader process will wait for the response forever and all progress stops.

There are lots of ways this could be solved. Some ideas:

This ticket was originally one task in a list at https://github.com/pelias/wof-admin-lookup/issues/117

orangejulius commented 7 years ago

It looks like Node.js has an exit event in the child process that should help us detect this case.