Post

Replies

Boosts

Views

Activity

Service worker is killed when Device memory usage is high. But service worker doesn't return after memory is freed up on device
We have a Safari browser extension experiencing an issue we believe the be caused by an iOS bug. The issue is affecting physical devices, particularly iPads with low amounts of RAM. When RAM usage goes up, iOS appears to kill the Service Worker to free up memory. Then, even after the RAM usage has gone down, the Service Worker does not come back. The only way to bring it back is for the user to manually disable and re-enable the extension, meaning any functionality that required the Service Worker to function remains broken. We have been able to reliably reproduce this crash on multiple mobile devices We do not see any memory leaks or particularly high usage, but we do see low memory warnings. The worker appears to be killed when RAM usage hits approx. 80%. Note that this is NOT related to the normal lifecycle of a service worker, once the background process is killed the connection is completely severed and it can not recover on its own.
6
1
1.2k
Dec ’22