strongloop / strong-pm

deployer for node applications
http://strong-pm.io
Other
1k stars 71 forks source link

Issue with event-stream #381

Closed krantik closed 4 years ago

krantik commented 7 years ago

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.

sam-github commented 7 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

krantik commented 7 years ago

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.

sam-github commented 7 years ago

Try setting the cluster size to 1.

@superkhau @ritch would you expect event streams to work when clustered?

superkhau commented 7 years ago

I'm not sure, @ritch is the SME here.

bugdanov commented 6 years ago

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...

stale[bot] commented 4 years ago

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.

stale[bot] commented 4 years ago

This issue has been closed due to continued inactivity. Thank you for your understanding.