openvenues / node-postal

NodeJS bindings to libpostal for fast international address parsing/normalization
MIT License
219 stars 76 forks source link

Segmentation fault #4

Closed pasupulaphani closed 8 years ago

pasupulaphani commented 8 years ago

has anyone experienced this?

root@f34e0cbbc3d5:/app/user# node
> require("node-postal");
Segmentation fault

Same using the bin directly!

root@f34e0cbbc3d5:/app/user# ./libpostal/src/libpostal "Quatre vignt douze Ave des Champs-lyses"
Segmentation fault
albarrentine commented 8 years ago

Can you tell me the following about your setup:

  1. How much memory does your machine have available? libpostal needs at least 2G free.
  2. Did you run out of disk space? If the models didn't download successfully, loading them could possibly cause a segfault. Running du -h -d1 on your libpostal data directory should show something like 3.3G if everything downloaded correctly.
  3. Which OS are you using, and can you post the output of uname -a?
pasupulaphani commented 8 years ago

Hi @thatdatabaseguy , I'm running in a docker.

  1. memory 3GB (1.5GB free)
  2. 1.4G ./libpostal
  3. Ubuntu 14.04
albarrentine commented 8 years ago

Interesting, we were about to start looking at Docker environments.

The disk usage sounds low. Can you run df -h and make sure the disk isn't full? If not, try rm -rfing the data dir and running make again.

Memory is also on the low side for node-postal since it loads both the parser and the normalization module at once. On a modern OS like Ubuntu 14.04 it will probably work, but may have to use swap.

pasupulaphani commented 8 years ago

Probably it hasn't got enough memory on Docker.

pasupulaphani commented 8 years ago

Probably it is better for us to use a hosted service. Since we are planning to use this as one of the service that powers our autocomplete service, it should be very very fast. Do you have any suggestions?