Skip to content

Redirect STDERR to /dev/null during eager_preload #623

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

Merged
merged 1 commit into from
Sep 13, 2022

Conversation

mvz
Copy link

@mvz mvz commented Aug 26, 2020

This is a rebased version of #618.

This is a patch by @markiz.

Fixes #396.

@mvz
Copy link
Author

mvz commented Dec 6, 2020

I've included the patch from #602 to have a non-failing base build.

@mvz mvz marked this pull request as ready for review January 16, 2021 09:26
@mvz
Copy link
Author

mvz commented Jan 16, 2021

It looks like the tests are green on modern Rubies and Railses ... If #617 is accepted I can rebase and all should be fine ...

@mvz
Copy link
Author

mvz commented Mar 5, 2021

I rebased and now the build is green.

@jaydorsey jaydorsey mentioned this pull request Aug 4, 2021
@rafaelfranca
Copy link
Member

Thank you for the pull request. I believe #655 fix the same problem. Can you confirm?

@mvz
Copy link
Author

mvz commented Nov 30, 2021

I'm not sure how to trigger this problem reliably anymore, but I think I was just hit by #396 again with the new spring version 3.1.1 (on Ruby 2.7.4).

@mvz
Copy link
Author

mvz commented Dec 1, 2021

@markiz since this is your patch, perhaps you can chime in on whether #655 fixes the problem for you?

@markiz
Copy link
Contributor

markiz commented Dec 22, 2021

@mvz Hey, apologies about the delay, just looking at the changeset, I imagine it's good.

The context there so far as I remember was that we had a ton of warnings (40+ lines) emitted upon rails startup from some other library, and the stderr buffer was not large enough to fit it all, and since it was not drained anywhere, it got immediately overflown, silently freezing spring.

Unfortunately, I don't have the access to that code anymore, so I can't verify.

@chrisblatchley
Copy link

hey @mvz i was having the same issue and found this PR. I was investigating this issue myself and arrived on a similar solution then found this PR already open. I tested these changes on our application and it worked great! I ended up making a similar fix that would write to spring_env.log_file instead of /dev/null but either works. would love to see this get merged!

@rafaelfranca rafaelfranca merged commit a5d2911 into rails:main Sep 13, 2022
@mvz mvz deleted the fix-freezes branch September 15, 2022 17:04
@mvz
Copy link
Author

mvz commented Sep 15, 2022

@rafaelfranca thanks for merging this!

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

Successfully merging this pull request may close these issues.

Spring hangs a lot
4 participants