-
Notifications
You must be signed in to change notification settings - Fork 49
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
Plug.Cowboy.Drainer shut down abnormally #92
Comments
Can you try running with |
This is with
The log message just before this is (in the most recent crash) |
Hrm, that's very weird then! What could be killing it? Maybe you can play with Erlang's |
I agree! My hunch is I'm running out of file descriptors or something at a system level? I don't know how else it would be so quiet... I've attached a tracer to my drainer process, so maybe that will show something. I don't think I can get away with tracing everything since it can be hours between crashes and I need to be able to work in the meantime 😓 |
OK that got a little more info!
There's more before that but the pattern repeats. I know this isn't always necessarily repeatable but if I restart the application and get the same pid ( |
Hrm, this is weird because ranch has no idea about this process unless we are shutting it down! |
Am I reading the trace correctly that the drainer is sending |
Right, but the point is that we should not be in that piece of the code unless the drainer started to terminate! |
I'm trying to catch it in the act but I think it might be getting triggered by or during the automatic rebuild cycle. Does that ring any bells? Is the trace saying that the call is timing out? What might cause that to timeout? It might hint at the root problem. I'll keep digging here but it's sort of hard because it's very distracting compared to the mild inconvenience of having to manually restart periodically 😂 Definitely open to ideas of things to try. |
OK I think I've actually tracked my problem down to another source - joken-elixir/joken_jwks#40 I'm wondering, though, if what I've seen here might hint at a problem in |
Right, that was my point since the beginning. This is definitely a secondary failure, something is making your app fail before, but I am not sure why you can't see the first failure! I am not sure if there is a bug here, for all purposes, the shutdown/kill is happening for correct reasons. |
I encountered this issue when a project didn't have the .env file used in the original dev environment. nb. this happened immediately when running |
Hi!
My app has been shutting down seemingly randomly. This only happens on my local machine (not on other devs, not in production environments) so I suspect it has something to do with my set up.
There are no logs when my app shuts down. It doesn't seem to correlate to any particular behavior. This has been happening for at least a couple weeks with regular daily development happening.
I finally got a clue by enabling SASL logging:
Based on looking at what
Plug.Cowboy.Drainer
does, this seems like the error could be a red herring? Any ideas how I could get more diagnostic information? I highly suspect this is a memory limit or running out of file descriptors or something else specific to my environment but I can't seem to get any more clues.I'm using
plug_cowboy
2.6.0 with Phoenix 1.7.0-rc.2 on Elixir 1.14.3, OTP 25The text was updated successfully, but these errors were encountered: