arithmetric / lambda-stash

AWS Lambda script to ship data from S3 to other data stores, like Elasticsearch
MIT License
52 stars 18 forks source link

elasticsearch client timeout #18

Closed garrickstapleszed closed 6 years ago

garrickstapleszed commented 6 years ago

When processing larger files, I was getting client timeouts. The default of 30 seconds wasn't enough. I ended up adding requestTimeout: Infinity to esConfig in shipElasticsearch.js:

   var esConfig = {
    host: config.elasticsearch.host,
    requestTimeout: Infinity
  };

I figure I don't really care about the client's timeout since Lambda has it's own timeout.

Maybe this could be exposed as a config option?

arithmetric commented 6 years ago

Thanks, exposing the configuration makes sense to me.