Rally: Test Case object API receives an error of 502 or 524
search cancel

Rally: Test Case object API receives an error of 502 or 524

book

Article ID: 185972

calendar_today

Updated On:

Products

Rally SaaS

Issue/Introduction

User is fetching Test Case object as part of a Weekly report processing, however, when running the current weekly report they are seeing that Test Case object fetched via REST API of Rally throws (524) Origin Time-out after loading 961600 rows. This error doesn’t seem to resolve and the error is consistent as they have tried to load the data in many ways and multiple times and the data load gets struck at 961600 rows.

Rally Support: We found the exact error in our logs.  They are receiving a 502 error when running a query to our API.  Their script fails on the same set of records every time.  If they skip those records, the script runs fine.  We have also tested this using a browser window with the same results.

 

 

Cause

They are fetching LastBuild and LastRun from the WorkProduct.  This happens to be a very expensive operation on the backend when there are a lot of TestCases and/or UserStories associated with those test cases.

Resolution

Rally Development team will be adding LastBuild and LastRun values to the database for faster lookup.

Shallow Fetch worked too: 

shallowFetch=FormattedID,Name,Parent,Project,Workspace

The reason the shallowFetch worked:  Most likely, they are hitting a workproduct (story I believe in this case since they are querying task) which has a very deep hierarchy.  This causes ALM to recursively lookup an unknown number of artifacts to render.  This is why we recommended the shallowFetch which will not recursive lookup the workproduct children.