logdna / logger-node

A nodejs logger client for LogDNA
MIT License
34 stars 17 forks source link

Axios maxBodyLength limit is exceeded after many simultaneous log calls #44

Closed vincegando closed 3 years ago

vincegando commented 3 years ago

If lots of log() function calls are called simultaneously, the event loop can become blocked and the maxBodyLength from axios will be exceeded.

{
   "meta": {
      "actual": "Request body larger than maxBodyLength limit",
      "code": "ERR_FR_MAX_BODY_LENGTH_EXCEEDED",
      "firstLine": "Example log statement",
      "lastLine": "Example log statement",
      "retrying": false,
      "attempts": 1,
      "headers": {
         "Content-Type": "application/json; charset=UTF-8",
         "user-agent": "@logdna/logger/2.2.1"
      },
      "url": "https://logs.logdna.com/logs/ingest?now=1600000000000&hostname=exampleHost&mac=&ip=&tags="
   }
}