Realtime : Unhandled Exception : Concurrent modification during iteration
- 0
- Self Hosted
- Flutter
- Realtime
Hello, I have an issue with the realtime functionnality. At first, connection is working well, and events in the db are triggered. But after some time, like maybe one or two minutes, the subscription randomly fails (onDone is called) and I have the following error : E/flutter (19415): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Concurrent modification during iteration: _Map len:0.
I have a self hosted Appwrite with the version 1.5.4. The server is in a local machine (localhost, Debian 11), and linked to a DNS domain by Cloudflare. In the client part, I use the appwrite package for Flutter with the version 12.0.3.
I uploaded a minimal code example where I meet this problem. It's been 2 days I'm searching on Discord/Github/Stackoverflow issues, but none helped me to fix it.
Do you have ideas how to solve this? Thank you for your time!
On the server side, the logs from the cmd docker compose logs -f appwrite-realtime give me :
appwrite-realtime | Notice: PDOStatement::execute(): Send of 397 bytes failed with errno=104 Connection reset by peer in @swoole/library/core/Database/PDOStatementProxy.php on line 44
appwrite-realtime |
appwrite-realtime | Notice: PDO::__construct(): Send of 5 bytes failed with errno=104 Connection reset by peer in /usr/src/code/app/init.php on line 848
appwrite-realtime | Connection open (user: 563)
appwrite-realtime |
appwrite-realtime | Notice: PDOStatement::execute(): Send of 383 bytes failed with errno=104 Connection reset by peer in @swoole/library/core/Database/PDOStatementProxy.php on line 44
appwrite-realtime | Connection close: 563
appwrite-realtime | Connection open (user: 564)
appwrite-realtime | Connection open (user: 565)
appwrite-realtime | Connection close: 564
And the logs from the Cloudflare :
2024-04-28T12:47:55Z ERR error="Incoming request ended abruptly: context canceled" connIndex=0 event=1 ingressRule=0 originService=http://localhost
2024-04-28T12:47:55Z ERR Request failed error="Incoming request ended abruptly: context canceled" connIndex=0 dest=(...)/v1/avatars/initials?name=Jamy&width=80&height=80&project=console event=0 ip=(...) type=http
Recommended threads
- SSR share session to client using custom...
Hi, so I was trying to get a hang of using SSR and using realtime updates in the same time which is done easiest if you have a custom domain in Appwrite and as ...
- Getting error when trying to add domain ...
we use self hosted appwrite on my company and every single time ever I tried to add a domain it shows this error on the top rigth: "Cannot read properties of un...
- Using OTP Email to verify user for passw...
Has anyone ever implemented this? If you did what was your aproach? Did you write an appwrite function?