realm / realm-object-server

Tracking of issues related to the Realm Object Server and other general issues not related to the specific SDK's
https://realm.io
293 stars 42 forks source link

Cloud: 502 Bad Gateway #393

Closed YaTree closed 5 years ago

YaTree commented 6 years ago

Goals

Expected Results

Actual Results

Note: I use Cloud, not self-hosted ROS. Sometimes I got errors like this:

Connection[1]: Connection closed due to error
Connection[1]: Connected to endpoint '52.25.46.81:443' (from '10.0.0.200:46696')
ERROR: Connection[1]: Websocket: Expected HTTP response 101 Switching Protocols, but received:
HTTP/1.1 502 Bad Gateway
Connection: keep-alive
Content-Length: 173
Content-Type: text/html
Date: Thu, 26 Jul 2018 19:27:29 GMT
Server: nginx/1.13.5

<html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.13.5</center>
</body>
</html>

What is the reason for the error? Could I do something to avoid this? If one client gets this error, does it mean that all others will too?

Steps to Reproduce

Unable to reproduce, sometimes everything works perfect, sometimes come these errors.

Code Sample

It is the "get started" code with little change - instead of "open", I create a new database.

function getStarted() {
    Realm.Sync.User.login(`https://${SERVER}`, USERNAME, PASSWORD)
        .then(user => {
            let realm = new Realm({
                sync: {
                            url: `realms://${SERVER}/~/tickers`,
                            user: user,
                            fullSynchronization: false
                        },
                        schema: [TickerSchema],
            })

Version of Realm and Tooling

Logs

systemctl status realm-object-server.service Paste output here
sudo journalctl -u realm-object-server.service Paste output here
cat /var/log/realm-object-server.log Paste output here
sipersso commented 6 years ago

I am experiencing the same issue on Android as well. Using Realm 5.4.0.

YaTree commented 6 years ago

Hello.

Any updates here? I again faced with the issue. :-(

nirinchev commented 5 years ago

We have resolved several issues related to temporary instance unavailability, so I believe this is fixed. If you experience service disruption again, please file a new issue and we'll investigate further.