sqlmapproject/sqlmap · error · SqlmapError

scan timed out after

Error message

scan timed out after %s second(s)

What it means

Watchdog in scan()'s subprocess supervision loop: the engine process did not exit before the caller-supplied timeout elapsed, so the whole process group is terminated and the run is aborted rather than left hanging.

Solutions

  1. Increase the timeout argument for slow targets
  2. Narrow the scan scope (fewer techniques, lower level)
  3. Check target availability — hangs often mean unreachable hosts or WAF stalls
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at lib/utils/library.py:158 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


AI-assisted analysis of sqlmapproject/sqlmap@0a35b20e39 (2026-08-26). Data as JSON: /api/errors/202c15b7df3bf4d2. Report an issue: GitHub.

Appendix: source

Thrown at lib/utils/library.py:158

        kwargs["creationflags"] = getattr(subprocess, "CREATE_NEW_PROCESS_GROUP", 0)
    elif sys.version_info >= (3, 2):
        kwargs["start_new_session"] = True                  # own process group -> clean group teardown
    else:
        kwargs["preexec_fn"] = os.setsid

    process = None
    try:
        process = subprocess.Popen(argv, **kwargs)

        if timeout is None:
            process.wait()
        else:
            end = time.time() + timeout
            while process.poll() is None:
                if time.time() > end:
                    _terminateProcess(process)
                    process.wait()
                    raise SqlmapError("scan timed out after %s second(s)" % timeout)
                time.sleep(0.5)

        try:
            with open(report, "rb") as f:
                return json.loads(f.read().decode("utf-8", "replace"))
        except (IOError, OSError, ValueError):
            try:
                with open(logFile, "rb") as f:
                    tail = f.read().decode("utf-8", "replace").strip()
            except (IOError, OSError):
                tail = ""
            raise SqlmapError("scan did not produce a valid report (exit code %s)\n%s" % (getattr(process, "returncode", None), tail[-1000:]))
    finally:
        try:
            os.close(logHandle)
        except OSError:
            pass
        devnull.close()

View on GitHub (pinned to 0a35b20e39)