-
Notifications
You must be signed in to change notification settings - Fork 196
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
WebSocket reconnection delay when app transitions from background to foreground #3864
Comments
github-actions
bot
added
pending-triage
Issue is pending triage
pending-maintainer-response
Issue is pending response from an Amplify team member
labels
Sep 16, 2024
Thanks for your report, @Innovation2012. Someone from the team will take a look at this as soon as they can. Until then, can you provide the code snippet for initializing the DataStore? |
github-actions
bot
removed
the
pending-maintainer-response
Issue is pending response from an Amplify team member
label
Sep 16, 2024
vincetran
added
datastore
Issues related to the DataStore category
pending-maintainer-response
Issue is pending response from an Amplify team member
follow up
Requires follow up from maintainers
and removed
pending-triage
Issue is pending triage
pending-maintainer-response
Issue is pending response from an Amplify team member
labels
Sep 16, 2024
Hi @vincetran
|
github-actions
bot
added
the
pending-maintainer-response
Issue is pending response from an Amplify team member
label
Sep 17, 2024
@Innovation2012 Thanks for providing the sample code. We'll work on reproducing the issue. |
github-actions
bot
removed
the
pending-maintainer-response
Issue is pending response from an Amplify team member
label
Sep 17, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Our clients are experiencing issues with receiving delta changes when transitioning between background and foreground states.
Issue Details:
When the app moves to the background, the WebSocket connection disconnects as expected.
Upon returning to the foreground, the WebSocket reconnection is delayed, taking anywhere from 3 to 5 minutes, sometimes even longer. The reconnection time is inconsistent.
As a result, users are unable to receive the latest data (delta changes) in a timely manner, causing significant problems in real-time data sync.
Key Questions:
What is the expected reconnection time for WebSocket after moving from background to foreground?
What is the minimum duration users should expect to wait for receiving delta changes after resuming from the background?
Is there any configuration from that we can modify the time as per our need?
This delay is negatively impacting user experience in our production app, and we’re seeking guidance on how to resolve this issue.
Steps To Reproduce
Just moved the application to background to foreground.
Expected behavior
Amplify Framework Version
2.37.0
Amplify Categories
DataStore
Dependency manager
Swift PM
Swift version
5.10
CLI version
12.6
Xcode version
15.3
Relevant log output
Is this a regression?
Yes
Regression additional context
No response
Platforms
iOS
OS Version
iOS 16.7.10
Device
iPhone X
Specific to simulators
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: