Meteor DDP.connect does not return to long polling

My team and I are implementing a service architecture in Meteor.

We have an external interface. It just uses the standard Meteor connection. We also have several backend services (eg Chat, Search) and we connect to them through an interface via DDP.connect(service_url)

.

In environment variables for the frontend, we have DISABLE_WEBSOCKETS=1

. We also set this environment variable to the same value for other services.

The interface uses long polling only when connected to it (default). However, when the frontend tries to connect to other services, the sites are not disabled. And DDP doesn't fall back to long polling.

Specifically, it tries to establish a connection to the web server first and fails with multiple XHR requests. Rinse and repeat. He does this hundreds of times and very quickly. As a result, everything just freezes.

WebSocket connection to 'wss://user.example.com/sockjs/884/ll_pzrru/websocket' failed: WebSocket is closed before the connection is established.
XHR finished loading: POST "https://user.example.com/sockjs/121/tmt57ih1/xhr_send".w._start
XHR finished loading: POST "https://user.example.com/sockjs/924/0i0c9_4f/xhr_send".w._start
XHR finished loading: POST "https://user.example.com/sockjs/221/ea72ap33/xhr".
WebSocket connection to 'wss://user.example.com/sockjs/884/ll_pzrru/websocket' failed: WebSocket is closed before the connection is established.
XHR finished loading: POST "https://user.example.com/sockjs/121/tmt57ih1/xhr_send".w._start
XHR finished loading: POST "https://user.example.com/sockjs/924/0i0c9_4f/xhr_send".w._start
XHR finished loading: POST "https://user.example.com/sockjs/221/ea72ap33/xhr".

      

How to make a DDP backup by long polling when using multiple applications?

+3


source to share





All Articles