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
- Send Email Verification With REST
I am using REST to create a user on the server side after receiving form data from the client. After the account is successfully created i wanted to send the v...
- Use different email hosts for different ...
Hello, I have 2 projects and i want to be able to set up email templates in the projects. Both projects will have different email host configurations. I see ...
- Migrate from cloud to localhost
Hello everyone. I need to migrate my test project from cloud to localhost, however it seems that this is possible only if a self-hosted appwrite instance it's h...