Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recommend max number of documents that tablets can handle #1994

Closed
rjcorwin opened this issue Mar 11, 2020 · 5 comments
Closed

Recommend max number of documents that tablets can handle #1994

rjcorwin opened this issue Mar 11, 2020 · 5 comments
Assignees
Milestone

Comments

@rjcorwin
Copy link
Contributor

No description provided.

@rjcorwin rjcorwin added this to the v3.8.1 milestone Mar 11, 2020
@rjcorwin rjcorwin changed the title Find limits of # of cases on tablets Find Samsung limits of Samsung Galaxy Tab A (8.0", 2019) Model number: SM-T295 Mar 11, 2020
@rjcorwin
Copy link
Contributor Author

rjcorwin commented Mar 11, 2020

Using the new generate-cases command, I generated 1,000 fully filled out cases from one of our project on the server. This resulted in about 29,000 documents in the database.

The initial registration sync using the APK went fine. It took about 10 minutes for the documents to download. However, on subsequent sync with no activity on the client or server, the app is crashing with an OutOfMemoryError.

Here's the logcat, note the stack trace points to final nail in the coffin being a function in the sqlcipher library.
image

Subsequent tries to sync repeated this behavior.

Switching gears to the PWA, the initial "Registration Sync" took about 10 minutes however it, failed to indicate that it was done. The UI reported no error, just "in progress" and 29,000 docs written. There were errors reported in the logs, but these might not actually be errors, we're just reporting them as such and may be misinterpreting them.

Screen Shot 2020-03-11 at 8 13 02 AM

Note that disk usage is looking pretty good on the PWA. A rough estimate is this model of Tablet could hold around 75,000 cases.

Screen Shot 2020-03-11 at 7 21 11 AM

Alas, on the subsequent sync after navigating away from the "stuck" sync. The sync seemed to start over at sequence 0. Only about half a megabyte is transferred, but it's a lot of requests to compare revisions from sequence 0 and so that took about 10 minutes.

Screen Shot 2020-03-11 at 8 13 02 AM

Lastly, on the "third sync", or rather the "second standard sync that is not registration sync", it picked up at the last sequence and took only moments to sync.

Perhaps the APK is crashing because it's starting a sync from sequence 0 of a large local database? Perhaps it's not starting at sequence 0 on subsequent sync, that could be unique to the PWA because the PWA seemed to have some error at the end of the registration sync, which could be the underlying reason the subsequent sync went back to 0.

More testing to be done!

@rjcorwin rjcorwin changed the title Find Samsung limits of Samsung Galaxy Tab A (8.0", 2019) Model number: SM-T295 Find limits of Samsung Galaxy Tab A (8.0", 2019) Model number: SM-T295 Mar 11, 2020
@rjcorwin
Copy link
Contributor Author

When the APK does the subsequent sync, it appears to pick back up at the last sequence. I'm assuming this is because it made it to the complete callback on it's registration sync.

Screen Shot 2020-03-11 at 2 27 08 PM

Trying to trigger the app crash is possible when doing a VERY large request to changes log. 1,000 limit is fine, 9,000 pushes it over the edge. Note how the last one does not return.

image

@rjcorwin
Copy link
Contributor Author

Doing a large allDocs can crash it as well.

image

@rjcorwin
Copy link
Contributor Author

Good news! Setting the since parameter to define a sequence since to sync with avoids crashes. It thought at first maybe it was because I was picking sequences that were not very far back in time but going all the way to the beginning (this db starts at sequence 64 for some reason), it still works.

Screen Shot 2020-03-11 at 4 07 52 PM

@rjcorwin
Copy link
Contributor Author

Uh oh, now regular sync is working on this tablet. Something about my test runs must have unblocked what was causing this issue. Perhaps my slow onramp of the sequence IDs during sync? I'll have to reinstall and test again. Moving this work over to "Fix crashing tablet on sync with APK in group with 1,000s of records #1995".

@rjcorwin rjcorwin self-assigned this Mar 11, 2020
@rjcorwin rjcorwin modified the milestones: v3.8.1, v3.8.2 Mar 16, 2020
@rjcorwin rjcorwin assigned chrisekelley and unassigned rjcorwin Mar 25, 2020
@rjcorwin rjcorwin modified the milestones: v3.8.2, v3.8.3, v3.9.0 Mar 31, 2020
@rjcorwin rjcorwin assigned rjcorwin and unassigned chrisekelley and rjcorwin Apr 8, 2020
@rjcorwin rjcorwin modified the milestones: v3.9.0, v3.10.0 Apr 13, 2020
@rjcorwin rjcorwin changed the title Find limits of Samsung Galaxy Tab A (8.0", 2019) Model number: SM-T295 Recommend max number of documents that tablets can handle May 28, 2020
@rjcorwin rjcorwin modified the milestones: v3.10.0, v3.11.0 May 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants