Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running with -q hangs #603

Closed
black-snow opened this issue Nov 7, 2024 · 10 comments · Fixed by #613
Closed

Running with -q hangs #603

black-snow opened this issue Nov 7, 2024 · 10 comments · Fixed by #613

Comments

@black-snow
Copy link

When I run oha with -q (and -w?) is just hangs at some point. It doesn't drain any CPU than and seems just dead-locked.

Example: oha -q 5 -z 30s -m POST -t 30s -d "$body" -T 'application/json' -w 'http://localhost:8000/score'

Sometimes it hangs after 4 seconds, somtimes after 22.

@devnev
Copy link

devnev commented Nov 13, 2024

Same for me, with oha -z 10s -q 30 -t 5s <url>, both with and without --no-tui, it hangs after a few seconds, and I have to pkill oha from a different terminal

@hatoo
Copy link
Owner

hatoo commented Nov 13, 2024

Thank you for your reports.

Could you tell me a OS and oha's version?

@devnev
Copy link

devnev commented Nov 13, 2024

oha 1.4.7, installed with brew, MacOS Sonoma 14.5, Intel x64.

I'm actually finding that if I replace -z 10s with -n 300 it works. There's some weirdness but I'm not sure if that is from oha or the service I'm testing.

@black-snow
Copy link
Author

black-snow commented Nov 13, 2024

oha 1.4.7

macOS (14 and 15, M3 chip) as well as various Linuxes (amd64)

@hatoo
Copy link
Owner

hatoo commented Nov 16, 2024

I can't reproduce it in both MacOS15 x64 and Ubuntu x64.

Could you tell me about the server side? If codes aren't available, please tell me the language and framework versions.

Is the -t option necessary to reproduce this issue?

@black-snow
Copy link
Author

Sadly, I can't test right now. The server is a Python app (3.12, fastapi + uvicorn both latest).

@nekevss
Copy link

nekevss commented Nov 21, 2024

I'm having the same issue with oha version 1.4.7 on Pop!_OS 22.04 where it hangs when provided -z 2m -q 1 (optionally with -w). I have found that adding --latency-correction does stop oha from hanging, but that's probably due to avoiding client::work_until_with_qps.

@black-snow
Copy link
Author

black-snow commented Nov 25, 2024

Another exec that hangs: oha -q 30 -z 10s -m POST -t 30s -w -d "$body" -T 'application/json' 'http://localhost:8000/get_score'

Will try with -n instead of -z.


No hang so far. But other interesting things happen. I guess it's due to timeouts? I set a qps of 10 and my endpoint is rather slow. oha starts off fine but then drops rps to zero, nothing happens for a bit, rps goes up a bit only to drop down to zero again, then after some time the progress bar continues to fill up but "Slowest" says "-inf".

grafik

Perhaps I don't quite understand what "Requests" in the upper left corner should tell me - when I set -q10 I'd expect it to pretty much always read 100 - it says "stats for the last 10s". Yet, when I run against the slow endpoint it sits somewhere between 0 and 4, then at some point the progress bar on the top progresses very quickly (but requests stats remains low).

@hatoo
Copy link
Owner

hatoo commented Nov 27, 2024

I think it's fixed in #613
Feel free to reopen this issue
Thank you!

@black-snow
Copy link
Author

Nice! Looking forward to the next release then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants