Faye server does not start by wizard

I am trying to run faye with a master. My procfile is as follows:

web: bundle exec rails server thin -p $PORT -e $RACK_ENV worker: bundle exec sidekiq redis: bundle exec redis-server faye: bundle exec rackup faye.ru -s thin -E production 

When I run bundle exec foreman start

the server, production and redis servers start correctly, but not the faye server.

In the console, I get: 10:53:56 faye.1 | started with pid 10907 10:53:56 faye.1 | started with pid 10907

and then nothing more from faye.

If I started the faye server using the command in procfile: bundle exec rackup faye.ru -s thin -E production , faye starts correctly. What am I doing wrong?

+4
source share
3 answers

When you run this locally:

 bundle exec rackup faye.ru -s thin -E production 

rackup will use the default port, which is 9292.

When it starts on Herkou, it may not start if this port is already in use. As far as I know, Heroku dynamically sets the $PORT variable to a valid free port.

I assume that Faye is either starting on a different port or not starting at all.

+2
source

It looks like faye is working fine. Try visiting http://localhost:{PORT}/faye.js to see if it is responding. He should be back with JS. Make sure you use the right port when calling faye server. After you start making requests, you should see how faye logs are spit out by the wizard.

0
source

This is a Foreman missing release .

If you do not see any result from your program, there is a chance that it will buffer stdout . Many languages ​​like Ruby and Python buffer stdout by default.

Faye does not set $stdout.sync = true , so its output is missing.

I had the same problem a while ago and tried to fix it, but my request was rejected.

0
source

Source: https://habr.com/ru/post/1468920/


All Articles