Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interrupts stdout when running in foreground mode using foreman #644

Open
johncadengo opened this issue Sep 14, 2022 · 1 comment
Open

Comments

@johncadengo
Copy link

johncadengo commented Sep 14, 2022

I added this to my Procfile and and running this with foreman.

rpush: bundle exec rpush start -f -e $RAILS_ENV

Now, when this line is commented out, foreman outputs to stdout properly and all the logs of the other processes show. But when I uncomment it, then I get output up until rpush loads. Once rpush loads, it takes over the stdout, which causes numerous issues besides not showing all the logs in terminal.

00:20:10 rpush.1     | ✔
00:20:10 rpush.1     | [2022-09-13 00:20:10] [app_name] Starting 1 dispatcher... ✔

After the check mark all output stops and then my computer has issues with buffering the output and eventually just stops working properly until I run crtl-c. At the point where I stop foreman with crtl-c all the backed up output comes streaming in.

Any idea what's going on?

@johncadengo
Copy link
Author

This is my current workaround if anyone else encounters this bug.

Update Procfile entries to:

rpush: bundle exec rpush start -f -e $RAILS_ENV > /dev/null
rpush_logs: tail --retry -f log/rpush.log

And make sure that rpush.rb has this entry in it:

  # Path to log file. Relative to current directory unless absolute.
  config.log_file = 'log/rpush.log'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant