Limit request size to api in MiteSynchronizer::TimeEntries remote_records #24
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.
We had the case that over 1000 id's had to be synced which failed permanently.
After a long debugging session I figured out that the request size is exceeded if around 700 ids are used for
Mite::TimeEntry.find()
.If the request limit is exceeded you'll get an error like this
Net::HTTPBadResponse: wrong status line:
- but to see it you've to add a logger toMiteController::save_account_data()
I tried to workaround this issue by adding a loop - but frankly speaking I've no clue of ruby.
From an architecture point of view the fix also should be located in
Mite::TimeEntry
or evenMite
and not inMiteSynchronizer::TimeEntries
.But to solve it the right way I've simply not enough ruby knowledge ;)
However it would be nice if the change or an enhanced version of it would get pulled into the official branch.
Thank you very much & best regards
Peter