Closed krantik closed 4 years ago
What are event streams? strong-pm isn't on the communication path for any data to your server, it just sets the PORT env var, and spawns your process. Is it possible event-streams don't work when used with node cluster
Here is an example on what we are using, https://loopback.io/doc/en/lb3/Realtime-server-sent-events.html
When we run locally it works fine, thru strong-pm on the server is not working.
We eliminated the possibility of nginx causing any issue by directly connecting port 3001 instead of proxy, even then there is no data response.
Yea, we have multiple servers running in the cluster. That might be an issue.
Try setting the cluster size to 1.
@superkhau @ritch would you expect event streams to work when clustered?
I'm not sure, @ritch is the SME here.
Ran into the same issue and did also waste time looking at nginx before landing here.
Running a cluster, changes are not sent to the client unless the EventSource('/api/myModel/change-stream?_format=event-stream')
request hits the same process as the request updating the database.
I believe everybody reading the docs and not seeing a fair warning would expect "/api/myModel/change-stream?_format=event-stream" returning the events whatever the process.
But since there is a problem it can be solved one way or another...
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been closed due to continued inactivity. Thank you for your understanding.
Is strong-pm blocking event-streams?
When we run the server with strong-pm event-streams are not working, when we use slc arc or forever event-streams are working fine.