Uploaded image for project: 'Okapi'
  1. Okapi
  2. OKAPI-693

Introduce filter request-log to avoid buffering HTTP content in memory

    XMLWordPrintable

    Details

    • Template:
    • Development Team:
      Core: Platform

      Description

      Observation: Okapi uses a lot of memory when uploading...

      Oleksii Kuzminov wrote on Slack:

      Hello all! I have the question about okapi and his redirecting mechanism.
      As I understand we call okapi from UI and it's looking module and redirect request with the body to him. But when we upload files okapi try to read buffer and write new request's body for a particular module. And here we get OutOfMemmory. Also, mod-audit-filter in prePostFilter trying to read ANY post request and create JsonObject from request's body without checking ContentType header. I created a bug for mod-audit-filter MODAFILT-5. But what I should do with Okapi? @dickmeiss @julianladisch

      curl -w '\n' -X POST -D -   \
         -H "Content-type: application/octet-stream"   \
         -d @marc.mrc \
         http://localhost:9130/data-import/upload/file?uploadDefinitionId=67dfac11-1caf-4470-9ad1-d533f6360bdd&fileId=88dfac11-1caf-4470-9ad1-d533f6360bdd
      

      As I understand Okapi handle this request and redirect to mod-data-import which provide this interface but -d marc.mrc this file can be 1GB And okapi die with OutOfMemmory.

        TestRail: Results

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                adam Adam Dickmeiss
                Reporter:
                adam Adam Dickmeiss
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    TestRail: Runs

                      TestRail: Cases