question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DataStore max subscriptions reached error

See original GitHub issue

Describe the bug I found an easy and reliable method of reproducing “MaxSubscriptionsReachedError” error which is coming from AppSync. This is a React Native project.

To Reproduce This is the most explicit ways I could figured out to reproduce the bug.

Updated repro methods: https://github.com/aws-amplify/amplify-js/issues/7036#issuecomment-746942585

1. Setup Auth and DataStore on your app. 2. Login and wait for syncing process is to finish. (I’d use Hub.listen('datastore') to wait for syncQueriesReady event to trigger) 3. On your physical device, off the WiFi. 4. Logout. 5. Turn WiFi on. 6. Repeat steps 2 to 6. Depends on your schema, you may need to do this up to 10 times until it hits the max subscription error. In my case, I would only need to repeat 5 times as my schema contains 7 models with 21 subscriptions.

Expected behavior Max subscription reached error shouldn’t happen. When this happens, the app is unable to receive any incoming changes from the server anymore.

Code Snippet I don’t have any project samples that I can share at the moment.

Screenshots Here’s a screenshot of what I get. image

Environment
System:
    OS: macOS 10.15.5
    CPU: (4) x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
    Memory: 53.96 MB / 8.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 14.3.0 - /usr/local/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.14.8 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Browsers:
    Chrome: 86.0.4240.80
    Safari: 13.1.1
  npmGlobalPackages:
    @aws-amplify/cli: 4.29.5
    ios-deploy: 1.10.0
    npm: 6.14.8
    react-native-cli: 2.0.1

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6] iPad
  • OS: [e.g. iOS8.1] iOS 13
  • React Native

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:29 (20 by maintainers)

github_iconTop GitHub Comments

2reactions
amhinsoncommented, Feb 15, 2021

Yes, thanks for the great reproduction sample! 🙏 We are aware of the issue, particularly as it relates to other similar issues around subscriptions, and it is in our internal queue.

1reaction
iartemievcommented, Aug 21, 2021

@rush86999 DataStore supports a maximum of 33 models, because it has to create 3 subscriptions per model to keep the local store in sync with AppSync. That error is expected for a schema containing > 33 models.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Maximum supported volumes reached (1020652) | VMware KB
When you are mounting a NFS volume, if NFS reaches the maximum number of supported volumes, the following error is displayed:
Read more >
AWS amplify running datastore with type/javascript freeze in ...
I am using the aws-amplify API to manipulate the datastore. ... We tried to fix appSync and subscriptions but it is not working...
Read more >
File Store - NATS Docs
A client that tries to create a subscription on a given channel (subject) for which the limit is reached will receive an error....
Read more >
Error messages - Resource Manager - Google Cloud
This document identifies some of the error codes and messages that Google APIs ... dailyLimitExceeded, A daily quota limit for the API has...
Read more >
Scalability and performance targets for standard storage ...
When your application reaches the limit of what a partition can handle for your workload, Azure Storage begins to return error code 503...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found