ENG-4490: Setting default value for query param '_limit'. #72
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
https://sightmachine.atlassian.net/browse/ENG-4490
The absence of the '_limit' parameter in the query dictionary resulted in a misleading log message indicating that '_limit' was set to 5000. However, in reality the parameter was left unset. Consequently, the limit was automatically set to the maximum possible value like 'np.Inf' before executing the SQL query. This led to Gateway Timeout-504 issues when attempting to fetch cycles from a DB with a large number of records.
If the limit is not set in the dictionary, by programmatically setting it to 5000 resolved the Gateway timeout issues. Enabling smooth execution of the notebook at my end.
However, it needs to be addressed that if the user selects a very large value for '_limit' in the query itself, then the issue may reappear again.