SvenskaSpel / locust-plugins

A set of useful plugins/extensions for Locust
Apache License 2.0
526 stars 136 forks source link

Getting error when using distributed load generation along with timescale . #141

Closed dev-clumio closed 3 months ago

dev-clumio commented 10 months ago

Got DivisionByZero error when trying to update testrun, most likely because there were no requests logged

I am trying to run locust in distributed mode along with that using timescale to put data into my tsdb . I have created 3 ec2 instances for this purpose. First one acts as master, while other two act as workers.

On the master host I run: locust -f test.py --headless --u 10 -t 10s --timescale --pghost=$PGHOST --pgport=5432 --pgpassword=$PASSWORD --pguser=$POSTGRES --master --expect-workers=2

On both worker nodes I run: locust -f test.py --worker --master-host=$MASTER_HOST

When I do this, I get the error which I shared at the top. I checked my tsdb, there are no new enteries in request table, but testrun table has a new entry.

But, when I run the test without distributed load generation using the command locust -f test.py --headless -u 10 -t 10s --timescale --pghost=$PGHOST --pgport=5432 --pgpassword=$PASSWORD --pguser=$POSTGRES , I see new entries has been to request as well as testrun table.

What could be going wrong here ? why am I not able to use distributed load generation along with timescale.

cyberw commented 10 months ago

You need to set --timescale on the worker as well I think?

manefix commented 8 months ago

that's weird but true, you need to set locust -f test.py --worker --timescale --master-host=$MASTER_HOST

wohui commented 5 months ago

that's weird but true, you need to set locust -f test.py --worker --timescale --master-host=$MASTER_HOST

got a error (locust: error: unrecognized arguments: --timescale) when use --timescale why?

cyberw commented 5 months ago

Is locust-plugins installed and is it the latest version?

wohui commented 5 months ago

Is locust-plugins installed and is it the latest version?

need installed by pip ?

cyberw commented 5 months ago

need installed by pip ?

yes

github-actions[bot] commented 3 months ago

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 10 days.

github-actions[bot] commented 3 months ago

This issue was closed because it has been stalled for 10 days with no activity. This does not necessarily mean that the issue is bad, but it most likely means that nobody is willing to take the time to fix it. If you have found Locust useful, then consider contributing a fix yourself!