[MGNLREST-148] Delivery endpoint fails when multiple concurrent requests Created: 09/Nov/17 Updated: 20/Nov/17 Resolved: 13/Nov/17 |
|
| Status: | Closed |
| Project: | Magnolia REST Framework |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.0 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Christopher Zimmermann | Assignee: | Dai Ha |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | 0d | ||
| Time Spent: | 5h | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Template: |
|
| Acceptance criteria: |
Empty
|
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
| Date of First Response: | |
| Sprint: | Saigon 122 |
| Story Points: | 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. 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. My endpoint configuration is as follows.
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
|
| Comments |
| Comment by Dai Ha [ 10/Nov/17 ] |
|
NodeWriter holding a currentLevel integer to tracking json writing and there is only one NodeWriter instance shared between request. The problem report here probably is the result of requests reset/changed currentLevel value causing jsonGenerator failed to operate. Solution: |
| Comment by Dai Ha [ 10/Nov/17 ] |
|
The fix that binds currentLevel to jsonGenerator available here: |
| Comment by Dai Ha [ 14/Nov/17 ] |
|
verify with bundle: magnolia-enterprise-pro-demo-bundle-5.6-20171113.193805-211-tomcat-bundle.zip. Issue fixed. |