Back

Realtime disconnected - should I be concerned?

  • 0
  • Self Hosted
  • General
  • Realtime
  • Web
kathelia.dokgu
20 Aug, 2023, 19:40

I've had realtime features going for a while now and I never really noticed anything on the console. I have recently moved my self-hosted instance of Appwrite behind Nginx Proxy Manager with port mappings 8080:80 and 8443:443. After that I started to notice on the dev console:

Realtime got disconnected. Reconnect will be attempted in 1 seconds.

Is this normal or did I mess something up?

TL;DR
The user moved their self-hosted instance of Appwrite behind Nginx Proxy Manager and started experiencing realtime disconnections. They tried adjusting timeout settings in the NPM web UI but it didn't work. Another suggestion was to add custom config for timeouts in the `/data/nginx/custom/server_proxy.conf` file, but this caused all services to go down. The user is concerned about the disconnections but mentions that the realtime features are still working correctly. No solution is provided in the support thread.
kathelia.dokgu
20 Aug, 2023, 19:44

Fwiw - realtime features are still working, I don't see anything wrong in my app - it's just a little concerning because I don't think I've seen realtime get disconnected before I moved Appwrite behind NPM.

Drake
21 Aug, 2023, 02:08

You could be hitting a connection timeout from your NPM

kathelia.dokgu
21 Aug, 2023, 02:10

What can I do about it? I logged into NPM and I don't see any settings for timeouts.

Drake
21 Aug, 2023, 02:15

You might need to add custom config

kathelia.dokgu
23 Aug, 2023, 03:53

This didn't seem to work. I went and created the /data/nginx/custom/server_proxy.conf file and in there I added the following:

TypeScript
server {
  proxy_read_timeout: 3600;
  proxy_connect_timeout: 3600;
  proxy_send_timeout: 3600;
}

I then ran docker docker compose up --force-recreate --remove-orphans -d and everything went down. So I deleted the file and restarted the services.

Drake
23 Aug, 2023, 04:08

Can't you add custom config in the NPM web UI ?

kathelia.dokgu
23 Aug, 2023, 04:09

Oh I never tried from the web UI. Anyway, I’ll try tomorrow if I can see anything from there. I’m done looking at this project tonight.

kathelia.dokgu
23 Aug, 2023, 23:54

Thank you! I went to the web UI and on the Advanced tab for Appwrite's proxy host, I entered:

TypeScript
proxy_read_timeout 3600s;
proxy_connect_timeout 3600s;
proxy_send_timeout 3600s;

And now I'm no longer getting timeout issues every minute. Is this generally a good practice? What's the timeout configuration for Appwrite generally?

Drake
23 Aug, 2023, 23:55

Set it to a reasonable time for you.

Traefik and Appwrite doesn't have a timeout

kathelia.dokgu
24 Aug, 2023, 00:04

Okay thank you - I think I'll just set it to 365d to try and mimic having no timeout like before I moved Appwrite behind NPM. Thank you for your help!

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more