[SERVER-20255] Ensure that init scripts can always terminate mongod gracefully Created: 02/Sep/15 Updated: 23/Feb/23 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | Admin |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | memorybox | Assignee: | Backlog - Service Architecture |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | devtools-to-servicearch | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Service Arch
|
| Participants: |
| Description |
|
run second mongod instance with the same pidpath will rewrite pid file with the running mongo, through even if it forked failed. So if you start mongod by init.d scripts twice, you can't stop mongod normally, why don't change pidfile after child process forked success? |
| Comments |
| Comment by Lauren Lewis (Inactive) [ 24/Feb/22 ] |
|
We haven’t heard back from you for at least one calendar year, so this issue is being closed. If this is still an issue for you, please provide additional information and we will reopen the ticket. |
| Comment by memorybox [ 06/Sep/15 ] |
|
Hi Ramon, thanks for your answer. |
| Comment by Ramon Fernandez Marina [ 02/Sep/15 ] |
|
memorybox, after some internal discussion we've decided to repurpose this ticket as an improvement request; the goal is to evaluate what can be done on MongoDB's end (server, init scripts) to make sure that init scripts can always terminate mongod gracefully. Regards, |
| Comment by Ramon Fernandez Marina [ 02/Sep/15 ] |
|
memorybox, this is expected behavior. Your second mongod instance was launched on the same dbpath, so after overwriting the previous PID file with the PID of the new process, mongod detected that there's another instance running on the same dbpath and exited to protect your data. In other words, you'll need a different dbpath and a different pidfilepath for every mongod instance you want to run. Any other configuration is unsupported and unsafe. Regards, |