locust icon indicating copy to clipboard operation
locust copied to clipboard

False "--run-time limit reached" log on stopping

Open deepjia opened this issue 5 months ago • 5 comments

Prerequisites

Description

When stop()/quit() is called, the terminal prints --run-time limit reached, shutting down, although this is not actually due to reaching the specified --run-time parameter."​​

Command line

locust -f main.py --web-port 8080 --csv report --processes 8 --autostart --autoquit 5 --run-time 5m

Locustfile contents

stop or quit manually

Python version

3.12

Locust version

2.37.14

Operating system

linux (based on centos

deepjia avatar Jul 22 '25 03:07 deepjia

def stop_and_optionally_quit():
        if options.autostart and not options.headless:
            logger.info("--run-time limit reached, stopping test")

seems not a proper condition in locust/main.py

deepjia avatar Jul 22 '25 03:07 deepjia

Yea that is statement is a guess rather than hard evidence for the run time limit being reached. Not sure if there is an easy fix for it though.

cyberw avatar Aug 07 '25 10:08 cyberw

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 20 days.

github-actions[bot] avatar Oct 07 '25 02:10 github-actions[bot]

Yea that is statement is a guess rather than hard evidence for the run time limit being reached. Not sure if there is an easy fix for it though.

I think it's not very appropriate to directly describe it as "--run-time limit reached" when it's unclear why it stopped. When the reason for stopping is uncertain, it's inappropriate to simply label it as "--run-time limit reached". I suggest either omitting this description, or - if there's a compelling reason to include it - making it explicitly clear that this is only a guess.

deepjia avatar Oct 08 '25 13:10 deepjia

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 20 days.

github-actions[bot] avatar Dec 08 '25 02:12 github-actions[bot]