Uploaded image for project: 'Help-Desk'
  1. Help-Desk
  2. HELP-14279

FIWARE.Question.Tech.Issues with Orion response RequestEntityTooLarge.

    Details

      Description

      Created question in FIWARE Q/A platform on 13-06-2018 at 14:06
      Please, ANSWER this question AT https://stackoverflow.com/questions/50837244/issues-with-orion-response-requestentitytoolarge

      Question:
      Issues with Orion response RequestEntityTooLarge

      Description:
      I had recently asked question regarding huge amount of connections at same time, and one of suggestions i got was that i should use BATCH operations. Thanks for that it helped a lot.

      Link to topic

      Now i have strange situation, i know what error mean and what is causing it but i have no idea how that happening in my case.

      So i have 2000 entities, i split them into 500 chunks ( i know i could split on 1000 or even little more but for now i stick with 500 )

      Then i proceed to create them into 4 batch operations, with is huge improvement from my previous logic of opening 2000 connections.
      I am using request promise library for that operations, and they are successfully created, but here thing become strange.

      Even they are created successfully my request promise returning this error,

      {
      "name": "StatusCodeError",
      "statusCode": 413,
      "message": "413 -

      {\"error\":\"RequestEntityTooLarge\",\"description\":\"payload size: 1487638, max size supported: 1048576\"}

      ",
      "error":

      { "error": "RequestEntityTooLarge", "description": "payload size: 1487638, max size supported: 1048576" }

      ,
      "options": {
      "method": "POST",
      "headers":

      { "Content-Type": "application/json", "Fiware-Service": "waste4think", "Fiware-ServicePath": "/deusto/w4t/zamudio/test" }

      ,
      "uri": "http://localhost:1026/v2/op/update?options=keyValues",
      "body":

      { "actionType": "UPDATE", "entities": [ 2000 entities ]}

      ,
      "json": true,
      "simple": true,
      "resolveWithFullResponse": false,
      "transform2xxOnly": false
      },
      "response": {
      "statusCode": 413,
      "body":

      { "error": "RequestEntityTooLarge", "description": "payload size: 1487638, max size supported: 1048576" }

      ,
      "headers":

      { "connection": "close", "content-length": "100", "content-type": "application/json", "fiware-correlator": "48689168-6ef7-11e8-a270-0242ac110003", "date": "Wed, 13 Jun 2018 10:48:18 GMT" }

      ,
      "request": {
      "uri":

      { "protocol": "http:", "slashes": true, "auth": null, "host": "localhost:1026", "port": "1026", "hostname": "localhost", "hash": null, "search": "?options=keyValues", "query": "options=keyValues", "pathname": "/v2/op/update", "path": "/v2/op/update?options=keyValues", "href": "http://localhost:1026/v2/op/update?options=keyValues" }

      ,
      "method": "POST",
      "headers":

      { "Content-Type": "application/json", "Fiware-Service": "waste4think", "Fiware-ServicePath": "/deusto/w4t/zamudio/test", "accept": "application/json", "content-length": 1487638 }

      }
      }
      }

      I console log my flow

      Sending: 0 500
      Sending: 1 500
      Sending: 2 500
      Sending: 3 500
      Sending: 4 134
      [ undefined, undefined, undefined, undefined, undefined ]

      As u can see it start with first, second batch etc... Undefined here is not problem since batch return only 204 when successful and i console log body instead of code...

      But after final batch is completed i get that error ( entities are created ).

      As u can see it show error like i put all entities in one huge batch with is not true, also this thing is shown even my entities are successfully created. Now what im missing here and why would Orion return this response but proceed to create entities in small batch operation normally?

      Any suggestion would help.

      Thanks

        Activity

        Hide
        backlogmanager Backlog Manager added a comment -

        2018-06-13 15:05|CREATED monitor | # answers= 0, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2018-06-13 15:05|CREATED monitor | # answers= 0, accepted answer= False
        Hide
        backlogmanager Backlog Manager added a comment -

        2018-06-14 00:05|UPDATED status: transition Answer| # answers= 1, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2018-06-14 00:05|UPDATED status: transition Answer| # answers= 1, accepted answer= False
        Hide
        backlogmanager Backlog Manager added a comment -

        2018-06-14 03:05|UPDATED status: transition Answered| # answers= 1, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2018-06-14 03:05|UPDATED status: transition Answered| # answers= 1, accepted answer= False
        Hide
        backlogmanager Backlog Manager added a comment -

        2018-06-14 12:05|UPDATED status: transition Finish| # answers= 1, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2018-06-14 12:05|UPDATED status: transition Finish| # answers= 1, accepted answer= True

          People

          • Assignee:
            jmcantera Jose Manuel Cantera
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: