{
  "id": "redis/redis-script-kill-failed-no-script-running",
  "signature": "ERR SCRIPT KILL failed - no script in execution right now",
  "signature_zh": "错误：SCRIPT KILL失败 - 当前没有正在执行的脚本",
  "regex": "ERR SCRIPT KILL failed - no script in execution right now",
  "domain": "redis",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "A user attempted to run SCRIPT KILL when no Lua script is currently executing, either because the script already finished or the server is not busy.",
  "root_cause_type": "generic",
  "root_cause_zh": "用户尝试执行SCRIPT KILL时，没有正在执行的Lua脚本，可能是因为脚本已经完成或服务器不忙碌。",
  "versions": [
    {
      "version": "redis 6.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "redis 6.2",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "redis 7.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "redis 7.2",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Repeatedly calling SCRIPT KILL until it works",
      "why_fails": "Calling SCRIPT KILL when no script is running just returns the same error each time; it does not help kill a script that may have already ended.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "Restarting Redis to clear any phantom scripts",
      "why_fails": "Restarting is unnecessary if no script is running; it causes downtime and may not address the real issue (e.g., a script that finished but left side effects).",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "Using SHUTDOWN NOSAVE to force stop",
      "why_fails": "SHUTDOWN NOSAVE is a drastic measure that discards all data; it is only needed when a script is stuck and SCRIPT KILL is refused, not when no script is running.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Verify script execution status with `CLIENT LIST` to see if any client is executing a script (look for 'script' flag). If no script is running, the error is harmless; ignore it.",
      "success_rate": 0.95,
      "how": "Verify script execution status with `CLIENT LIST` to see if any client is executing a script (look for 'script' flag). If no script is running, the error is harmless; ignore it.",
      "condition": "",
      "sources": []
    },
    {
      "action": "If a script appears stuck but SCRIPT KILL fails, use `MEMORY DOCTOR` to check for memory issues or `SLOWLOG GET` to find long-running commands that may be blocking.",
      "success_rate": 0.8,
      "how": "If a script appears stuck but SCRIPT KILL fails, use `MEMORY DOCTOR` to check for memory issues or `SLOWLOG GET` to find long-running commands that may be blocking.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Set a Lua script timeout in redis.conf: `lua-time-limit 5000` (5 seconds) to prevent scripts from running indefinitely, reducing the need for manual SCRIPT KILL.",
      "success_rate": 0.9,
      "how": "Set a Lua script timeout in redis.conf: `lua-time-limit 5000` (5 seconds) to prevent scripts from running indefinitely, reducing the need for manual SCRIPT KILL.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Verify script execution status with `CLIENT LIST` to see if any client is executing a script (look for 'script' flag). If no script is running, the error is harmless; ignore it.",
    "If a script appears stuck but SCRIPT KILL fails, use `MEMORY DOCTOR` to check for memory issues or `SLOWLOG GET` to find long-running commands that may be blocking.",
    "Set a Lua script timeout in redis.conf: `lua-time-limit 5000` (5 seconds) to prevent scripts from running indefinitely, reducing the need for manual SCRIPT KILL."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://redis.io/docs/latest/commands/script-kill/",
  "official_doc_section": null,
  "error_code": "ERR",
  "verification_tier": "ai_generated",
  "confidence": 0.9,
  "fix_success_rate": 0.92,
  "resolvable": "true",
  "first_seen": "2023-08-05",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}