Meteor js - client view doesnt update (AWS Lightsail + Nginx reverse proxy)

My Meteor app doesnt want to work properly when uploaded to AWS Lightsail.

The problem is - when I update a document in collection the changes are not reflected on the client, and even more strange - the updated variable disappears from the client view. Everything works well in development on my local machine though. I also had the same app deployed to my office server machine and was running without any issues.

I created simple script to reproduce the problem, see on the vid:

So adding or removing document reflects without issue on the client side, but when I try to edit a variable (name) - it saves it to the database, but the client doesnt the reflect the change until I refresh the page.

To me it feels like there might be some problem with maybe wrongly configured websocket connection that doesnt work together with AWS services, but I might be totally wrong on that. In the full version of the app the websocket was constantly reconnecting and closing connection when I tried to authenticate the user (in a cycle of few hundred times per minute) and the app was stuck on log in screen.

Maybe someone has already met a similar problem or at least would have some clue where I could look for a cause of it?

Let me know if you want me to provide any more details.

Do you get any message in console such as “WebSocket is closed before the connection is established”?

Check this one:
It might be that Lightsail doesn’t have the right support for Websockets. You may try to add a load balancer and see if that fixes your issue but I feel Lightsail is not the right platform for Meteor.

1 Like

Thank you for your response.

I dont get the “Websocket is closed…” message, but something is definitely off in that area. It feels its like you wrote - that the Lightsail is not the right platform for Meteor.

Will look for other solutions then.


We have had a lot of success with Convox – you can use it to deploy to AWS ECS.

Looks like websocket works but oplog tailing doesn’t.

You will need to deploy on a server that can run node and a webserver. It could be any instance.