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

Use a higher timeout for remote PIP resolver #192

Closed otbutz closed 6 years ago

otbutz commented 6 years ago

The remote PIP resolver uses the microservice-wrapper with its default config: 250ms timeout, 3 retries

This leads to possible errors during the import if the PIP service is hit with a high amount of queries:

2018-03-09T13:33:42.000Z - error: [pip] http://localhost:3102/9.170422/42.445732?layers=neighbourhood,borough,locality,localadmin,county,macrocounty,region,macroregion,dependency,country: {"timeout":250,"code":"ECONNABORTED","errno":"ETIME","retries":3}

The default timeout value should be raised and made configurable through pelias.json.

orangejulius commented 6 years ago

We should definitely raise the default timeout. That would be a PR to microservice-wrapper here.

It is already configurable with a section like this in pelias.json

  "api": {
    "services": {
      "pip": {
        "url": "http://localhost:3102",
        "timeout": 5000
      }   
    }   
  }
orangejulius commented 6 years ago

I've just bumped the default timeout up a bit after some similar feedback, and added documentation to pelias/api with clear examples of how to use the config options.