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

Flutter amplify dataStore sync failure with more than 42 tables #4296

Closed
3 of 14 tasks
AzharRaeisi opened this issue Jan 1, 2024 · 8 comments
Closed
3 of 14 tasks

Flutter amplify dataStore sync failure with more than 42 tables #4296

AzharRaeisi opened this issue Jan 1, 2024 · 8 comments
Assignees
Labels
datastore Issues related to the DataStore Category pending-close-response-required The issue will be closed if details necessary to reproduce the issue are not provided within 7 days.

Comments

@AzharRaeisi
Copy link

AzharRaeisi commented Jan 1, 2024

Description

I am encountering a critical issue with Flutter Amplify DataStore sync when the number of tables exceeds 42. The sync process fails to operate entirely, and I am experiencing a complete breakdown in functionality. Datastore does not emit any sync event. There is just networkStatus event in hub as can be seen in the screenshot.

Amplify Datastore works fine if there are lower table numbers in dynamodb.

Categories

  • Analytics
  • API (REST)
  • API (GraphQL)
  • Auth
  • Authenticator
  • DataStore
  • Notifications (Push)
  • Storage

Steps to Reproduce

No response

Screenshots

log

Platforms

  • iOS
  • Android
  • Web
  • macOS
  • Windows
  • Linux

Flutter Version

3.13.9

Amplify Flutter Version

amplify_flutter: ^1.4.1 amplify_auth_cognito: ^1.4.1 amplify_api: ^1.4.0 amplify_datastore: ^1.4.1 amplify_storage_s3: ^1.4.0

Deployment Method

Amplify CLI

Schema

No response

@haverchuck haverchuck added pending-triage This issue is in the backlog of issues to triage pending-community-response Pending response from the issue opener or other community members labels Jan 2, 2024
@haverchuck
Copy link
Contributor

@AzharRaeisi Thanks for reporting this issue. Which Flutter platforms are you testing on?

@haverchuck haverchuck added the datastore Issues related to the DataStore Category label Jan 2, 2024
@AzharRaeisi
Copy link
Author

@haverchuck Thanks for your response. Tested on IOS and Android

@haverchuck
Copy link
Contributor

@AzharRaeisi I think this issue may be due to the fact that AppSync establishes a limit of 100 active subscriptions per client. It establishes 3 for each model, so we would typically expect this issue to occur if you have more than 33 models (although in this case you seem to have more - perhaps some of your tables are not backing models?). This is a soft limit and can be adjusted with a limit increase request to AppSync.

More information can be found here, including a link for increasing the limit.

@haverchuck haverchuck added pending-close-response-required The issue will be closed if details necessary to reproduce the issue are not provided within 7 days. and removed pending-community-response Pending response from the issue opener or other community members pending-triage This issue is in the backlog of issues to triage labels Jan 2, 2024
@AzharRaeisi
Copy link
Author

@haverchuck you are right I do have 33 models with more then 13 enums. I have increased the limit to 300, hope this will fix the problem. Thank you.

Another question will it cost more?

@haverchuck
Copy link
Contributor

haverchuck commented Jan 4, 2024

@AzharRaeisi I'd encourage you to check out the pricing information for AWS AppSync. It is my understanding that in your situation you could potentially incur more charges because you would be receiving more "Real Time Updates", but this could also happen in other ways (such as an increase in end users) - but I will defer to the pricing guide as the source of truth here.

@AzharRaeisi
Copy link
Author

@haverchuck is it possible to avoid syncing a table entirely and only initiate sync if needed in the future? If not, does it mean that DataStore requires three subscriptions per DynamoDB table? Am I correct?

@haverchuck
Copy link
Contributor

haverchuck commented Jan 5, 2024

Yes, three subscriptions per model. We do have selective sync functionality to limit what actually gets transmitted across the wire, but the subscriptions are still establishe regardless, so this is not a solution currently.

We are tracking a feature request to improve this: #1692

If you decide to get a limit increase from AppSync and encounter difficulties, please create an issue. Also, feel free to upvote the feature request above!

@AzharRaeisi
Copy link
Author

@haverchuck, appreciate your generous support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datastore Issues related to the DataStore Category pending-close-response-required The issue will be closed if details necessary to reproduce the issue are not provided within 7 days.
Projects
None yet
Development

No branches or pull requests

2 participants