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
- redirect_uri errors on flutter client
Hi all, I'm using the flutter client for my app to do appwrite auth and use the JWTs to send to my backend. When I try to sign in with SSO, I get this: https:/...
- float
Hello everyone, So, I created a column of type **float** with the **min** and **required** options, I noticed that it wouldn't let me set a **2 decimal points ...
- Unauthorized Charge on My Card – I Don’t...
Hi, I need urgent help. I received a bank SMS about a charge from "APPWRITE PRO" (18.460 JOD on 10/12/2025 at 03:47), but I DO NOT have an Appwrite account and...