{"record":{"id":"e08ec7aa767d51d7","repo":"Netflix/chaosmonkey","slug":"not-terminating-check-for-min-time-between-termin","errorCode":null,"errorMessage":"not terminating: check for min time between terminations failed","messagePattern":"not terminating: check for min time between terminations failed","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"term/term.go","lineNumber":159,"sourceCode":"\t\tlog.Printf(\"No eligible instances in group, nothing to terminate: %+v\", group)\n\t\treturn nil\n\t}\n\n\tlog.Printf(\"Picked: %s\", instance)\n\n\tloc, err := d.MonkeyCfg.Location()\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"not terminating: could not retrieve location\")\n\t}\n\n\ttrm := chaosmonkey.Termination{Instance: instance, Time: d.Cl.Now(), Leashed: leashed}\n\n\t//\n\t// Check that we don't violate min time between terminations\n\t//\n\terr = d.Checker.Check(trm, *appCfg, d.MonkeyCfg.EndHour(), loc)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"not terminating: check for min time between terminations failed\")\n\t}\n\n\t//\n\t// Record the termination with configured trackers\n\t//\n\tfor _, tracker := range d.Trackers {\n\t\terr = tracker.Track(trm)\n\t\tif err != nil {\n\t\t\treturn errors.Wrap(err, \"not terminating: recording termination event failed\")\n\t\t}\n\t}\n\n\t//\n\t// Actual instance termination happens here\n\t//\n\terr = killer.Execute(trm)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"termination failed\")","sourceCodeStart":141,"sourceCodeEnd":177,"githubUrl":"https://github.com/Netflix/chaosmonkey/blob/eaa28fb761c0ebe8644d1333e5d164e9cc3071e9/term/term.go#L141-L177","documentation":"Returned by doTerminate when the min-time-between-terminations checker rejects the would-be termination (e.g. another termination happened too recently for this app); the wrapped error preserves the checker's reason for the violation.","triggerScenarios":"Thrown at term/term.go:159 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Schedule the next run respecting the app's minimum interval config","Inspect the wrapped checker error to see the elapsed-vs-required timing","Do not force termination; this guard protects app stability"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"eaa28fb761c0ebe8644d1333e5d164e9cc3071e9","analyzedAt":"2026-09-03T17:04:39.020Z","contentChangedAt":"2026-09-03T17:04:39.020Z","schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}