Uploaded image for project: 'Magnolia REST Framework'
  1. Magnolia REST Framework
  2. MGNLREST-148

Delivery endpoint fails when multiple concurrent requests

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 2.0
    • None
    • None
    • None
    • Saigon 122
    • 5

    Description

      If I issue multiple requests at the same time then I get sporadic failures (about half the time) where code 500 is returned, and exceptions are written to the log.
      Sometimes the response contains message "writeStartObject() cannot be called in object context", sometimes it actually does return the proper response body - although it had the code 500.
      The same problem happens if i hit three different "endpointPrefixes" at the same time, instead of the same "prefix" multiple times.

      If I only issue one request at a time, there are no errors and I get the expected response.

      I have the CORS filter installed on my server in order to make requests to it from another server in a headless fashion. (https://wiki.magnolia-cms.com/display/WIKI/CORS+filter+documentation)

      Please see attachments to reproduce the error.
      "problem.html" - simple webpage to open in browser.
      "problem-node.js" run from command line with: node problem-node.js

      My endpoint configuration is as follows.
      The problem happens less if I remove the referenceresolvers, but still happens a few times.

        tours:
          nodeTypes:
            0: mgnl:content
          includeSystemProperties: false
          bypassWorkspaceAcls: true
          limit: 50
          references:
            tourTypes:
              propertyName: tourTypes
              referenceResolver:
                implementationClass: info.magnolia.rest.reference.jcr.UuidReferenceResolver
                targetWorkspace: category
            destinations:
              propertyName: destination
              referenceResolver:
                implementationClass: info.magnolia.rest.reference.jcr.UuidReferenceResolver
                targetWorkspace: category
      

      Checklists

        Acceptance criteria

        Attachments

          1. problem.html
            0.7 kB
          2. problem-node.js
            0.6 kB

          Activity

            People

              dai.ha Dai Ha
              czimmermann Christopher Zimmermann
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Checklists

                  Bug DoR
                  Task DoD

                  Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0d
                    0d
                    Logged:
                    Time Spent - 5h
                    5h