aws-amplify / amplify-swift

A declarative library for application development using cloud services.
Apache License 2.0
462 stars 198 forks source link

Memory leaks on web sockets: each `DataStore.start()` add new web sockets but old ones remain active. use Starscream 4.0.6 #3509

Closed lawmicha closed 7 months ago

lawmicha commented 9 months ago

During this test I can see that there are memory leaks on web sockets: each DataStore.start() add new web sockets but old ones remain active. In my mind, we should use Starscream 4.0.6 which include this fix: https://github.com/daltoniam/Starscream/commit/d2a9549ea45018ef6802e3fe3c61490386a0ee8c

Originally posted by @gbitaudeau in https://github.com/aws-amplify/amplify-swift/issues/3259#issuecomment-1932387569

github-actions[bot] commented 9 months ago

This issue was opened by a maintainer of this repository; updates will be posted here. If you are also experiencing this issue, please comment here with any relevant information so that we're aware and can prioritize accordingly.

lawmicha commented 9 months ago

We're in the process of migrating off AppSyncRealTimeClient package, which has the dependency on Starscream, over to URLSession here https://github.com/aws-amplify/amplify-swift/pull/3527 We should retest the memory leak scenario the changes from this PR

lawmicha commented 8 months ago

We plan to upgrade Starscream to 4.0.7. We can merge the upgrade commit on top of main and release it as 3.2.0 https://github.com/aws-amplify/aws-appsync-realtime-client-ios/commits/main/ . The upgrade 4.0.6 will be replaced, we will not have a release which depends on 4.0.6

Image

lawmicha commented 7 months ago

Amplify V2 (main branch) no longer depends on AppSyncRealTimeClient package which had Starscream, it was replaced at v2.29.0 https://github.com/aws-amplify/amplify-swift/releases/tag/2.29.0

github-actions[bot] commented 7 months ago

This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.