-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Graceful shutdown of the BSC node when running as a system service (1.3.x) #2163
Comments
Hi there, Please upgrade to geth v1.3.7 (https://github.com/bnb-chain/bsc/releases/tag/v1.3.7) and see if it works. In addition to this, once upgraded, please do share the logs as well while starting the node and also when stopping the node. |
Basically, bsc node can be shutdown gracefully, it could take around 15second as I know. But we did notice some nodes failed to graceful shutdown due to the incorrect use of this flag: "--history.transactions 0", if you just upgrade from v1.2.x to v1.3.0, pls notice that "--txlookuplimit" has been replaced by "--history.transactions" since v1.3.x Here is the service file and script that we use to start/stop bsc node, for your reference.
/server/node/chaind.sh
|
@deepcrazy - I'll try to get those logs when this happens again, unfortunately, the node logs have rotated for me to get that information, Although, the behavior between different versions wouldn't/shouldn't matter as far as initialization or breakdown of the process itself, but, I could be wrong. @zzzckck - thanks for your input, the major differences worth highlighting that maybe(?) make the difference between graceful shutdown are as follows: -
Based on the above, I've tried combining the two below:
As to your other point, I'm not utilizing either""--history.transactions 0" or "--txloouplimit". Let me know what you think of the above or any further recommendations - otherwise, I'll just try this and force simulate a restart with the hopes of fixing my problem. |
I was able to reproduce the same issue, the node was stuck (#2145, #2104) based on the recommendation to remove the "nodekey" file from the downloaded snapshot or restarting the node - the db got fried, but I was able to capture the logs: After Logs
Then when you
From
|
This issue has been resolved by this PR: #2155 |
System information
This is the current service file for running the node:
From what I've observed, this doesn't lead to a graceful shutdown of the node service that causes a myriad of other problems (db corruption, unclean shutdowns, etc.)
Is there a recommended service file that I can use to avoid these issues, and is there anything else that I can update above to avoid them effectively?
There's an ongoing issue with the startup of both pruned/non-pruned nodes post an "unclean shutdown", even though I'm trying to gracefully shut it down using the above service file that causes the database to be fried and the nodes require a resync. (#2110)
This is getting mission critical to avoid this problem both knowingly/unknowingly as the hard fork is right around the corner without a fix/merge to the problem - #2155
Thanks for your help! Let me know if you have any questions for me.
Edit: I've tried playing with both SIGTERM vs SIGHUP but without any noticeable changes - would like to know if there's a "recommended" less violet kill signal preferred over the other.
The text was updated successfully, but these errors were encountered: