Closed shivam-880 closed 6 months ago
It looks like you hit the 6-connection-per-origin limit that is hardcoded into the browsers. Please read this to learn about the workarounds: https://rxdb.info/replication-couchdb.html#limitations
Unfortunately this workaround doesn't work!
2024/04/27 17:59:39 [error] 29306#29306: *1 upstream timed out (110: Connection timed out) while reading upstream,
client: 91.195.215.124, server: myapp.shivamkapoor.com,
request: "GET /timetable_106566519089485180314/_changes?style=all_docs&feed=longpoll&since=now&include_docs=true&heartbeat=60000&limit=20&seq_interval=20 HTTP/2.0",
upstream: "https://127.0.0.1:6985/timetable_106566519089485180314/_changes?style=all_docs&feed=longpoll&since=now&include_docs=true&heartbeat=60000&limit=20&seq_interval=20",
host: "myapp.shivamkapoor.com:6984",
referrer: "https://myapp.shivamkapoor.com/"
As you can see request
does have HTTP/2.0
added this time unlike HTTP/1.1
before changes to the nginx conf:
request: "GET /timetable_106566519089485180314/_changes?
style=all_docs&
feed=longpoll&
since=now&
include_docs=true&
heartbeat=60000&
limit=20&
seq_interval=20
HTTP/2.0"
This is what my nginx conf looks like now:
upstream couchdb {
server localhost:6985;
keepalive 16;
}
server {
listen 6984 ssl http2;
server_name myapp.shivamkapoor.com;
ssl_certificate /opt/couchdb/etc/cert/fullchain.pem;
ssl_certificate_key /opt/couchdb/etc/cert/privkey.pem;
location / {
proxy_pass https://couchdb;
proxy_redirect off;
proxy_buffering off;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Connection "";
}
}
Nginx Version
# nginx -v
nginx version: nginx/1.14.0 (Ubuntu)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed soon. If you still have a problem, make a PR with a test case or to prove that you have tried to fix the problem. Notice that only bugs in the rxdb premium plugins are ensured to be fixed by the maintainer. Everything else is expected to be fixed by the community, likely you must fix it by yourself.
Issues are autoclosed after some time. If you still have a problem, make a PR with a test case or to prove that you have tried to fix the problem.
So I have deployed my app on a server behind nginx reverse proxy server with configurations which look like this:
I am facing replication error on the browser:
The nignx error logs at
/var/log/nginx/error.log
look like this:Thought may its an issue with the couchdb but following command return
Ok
:Tried a suggestion from stackoverflow proposing to clear connection header. This doesn't seem to take any effect.
What seems to stall the replication error was this suggestion:
However, this leaves requests in
pending
state! It clearly looks like it is stalling the replication error to sometime in the future.Not really sure what's causing rxdb replication to fail like this!
Although I would like to point out that data does get writing to the couchdb collection. But this error certainly suggest the replication needs a fix!
Please suggest what can be done to resolve this issue! What am I doing wrong?