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

Fix premature exit #135

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix premature exit #135

wants to merge 1 commit into from

Conversation

suexcxine
Copy link

I met a lot of the following error logs when I execute init:stop()

14:46:29.924 [error] Undefined:Undefined gen_server <0.1199.0> terminated with reason: killed
14:46:29.924 [error] Undefined:Undefined CRASH REPORT Process <0.1199.0> with 0 neighbours exited with reason: killed in gen_server:decode_msg/9 line 432

And terminate function of mysql_conn.erl didn't get fully executed.

I have a pool size of 1600, maybe this caused this problem to be obvious.

Because exit(State#state.supervisor, shutdown) is async shutdown, the pool process passed away immediately,
so State#state.supervisor gets also killed,
Now that parent of all workers is dead, so workers show messages pasted above(gen_server:decode_msg/9 line 432),
So we need to wait a little bit to allow workers to terminate properly.

I met a lot of the following error logs when I execute `init:stop()`
```
14:46:29.924 [error] Undefined:Undefined gen_server <0.1199.0> terminated with reason: killed
14:46:29.924 [error] Undefined:Undefined CRASH REPORT Process <0.1199.0> with 0 neighbours exited with reason: killed in gen_server:decode_msg/9 line 432
```
And terminate function of mysql_conn.erl didn't get fully executed.

I have a pool size of 1600, maybe this caused this problem to be obvious.

Because `exit(State#state.supervisor, shutdown)` is async shutdown, the pool process passed away immediately,
so State#state.supervisor gets also killed, 
Now that parent of all workers is dead, so workers show messages pasted above(gen_server:decode_msg/9 line 432), 
So we need to wait a little bit to allow workers to terminate properly.
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.

1 participant