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

Locust Web Dashboard Charts, Slaves sections not working after certain time #1276

Closed
abinjaik opened this issue Mar 3, 2020 · 11 comments
Closed

Comments

@abinjaik
Copy link

abinjaik commented Mar 3, 2020

We are getting issues on Locust Web Dashboard after some time or certain load. Initially we thought its related to errors on our scripts, but even with zero errors/exception on our locust scripts we are getting "Charts" with no graphs or values on it . Same with "Slaves" Tab, its not displaying any info at all. Also, the top right on dashboard we have a RPS indicator that also fails. I did refresh few times, its only showing latest data on "Statistics" tab, **but "Charts", "Slaves" tab have no information. We are using Locust 0.14.4.. I saw different bug with similar description, but that tells it got fixed with an earlier version.

I checked Firefox browser console and its displaying an error on locust.js -SyntaxError: invalid escape sequence

image

I tried the same with Chrome, it is also pointing with locust.js file

image

[UPDATE] : Its seems this error happens when there are more RPS, when we tried with a "sleep" inside our Locust code --- we were able to run for quite a long than previous runs, but in the end it failed.

Please help with your inputs.

Environment

OS: Linux Ubuntu( acutally a VM on Azure) - Linux 5.0.0-1032-azure x86_64
Python version: Python 3.6.9
Locust version: locust 0.14.4

@heyman
Copy link
Member

heyman commented Mar 4, 2020

The only thing I can think of that could maybe cause this kind of symptoms is if you have a huge number of URL-endpoints that you don't group using the HTTP client's name attribute. How many endpoints do you have in the "Statistics" table?

Otherwise, without a way to reproduce this, it's very hard for me to debug it. Therefore I recommend that you try to create a minimal reproducible example and post here (code for the locustfile and detailed instructions on how to reproduce the error).

@abinjaik
Copy link
Author

abinjaik commented Mar 5, 2020

@heyman : Do you mean this ? https://docs.locust.io/en/stable/writing-a-locustfile.html#grouping-requests-to-urls-with-dynamic-parameters . If yes, we used grouping most of the cases.

On the Web UI/Dashboard , we have "Statistics" tab for 70 urls endpoints, but when we download the request statistics in CSV its above 1000 rows.. How does that happens? Please let us know.

@heyman
Copy link
Member

heyman commented Mar 5, 2020

Yes, that's what I meant.

Which CSV file are you downloading? What does it contain?

@abinjaik
Copy link
Author

abinjaik commented Mar 5, 2020 via email

@heyman
Copy link
Member

heyman commented Mar 5, 2020

That sounds very weird, and I have no idea why that might be. If you can find out a way in which I can reproduce it I should be able to debug it.

@abinjaik
Copy link
Author

abinjaik commented Mar 5, 2020

That sounds very weird, and I have no idea why that might be. If you can find out a way in which I can reproduce it I should be able to debug it.

From the errors on the browser console, it indicates that error is caused due to "invalid escape sequence" in the locust.js 's renderTable() and UpdateStats() function. Will you able to dig in that direction.

@heyman
Copy link
Member

heyman commented Mar 5, 2020

Without a way to reproduce it, the only thing I can do is guess and speculate.

@abinjaik
Copy link
Author

abinjaik commented Mar 5, 2020 via email

@heyman
Copy link
Member

heyman commented Mar 6, 2020

When this happens, could you download the JSON output at http://locust-host:8089/stats/requests and upload it somewhere so I could have a look? Using that I might be able to reproduce the error.

@abinjaik
Copy link
Author

abinjaik commented Mar 7, 2020

When this happens, could you download the JSON output at http://locust-host:8089/stats/requests and upload it somewhere so I could have a look? Using that I might be able to reproduce the error.

@heyman Here it is . Please find the attached requests.txt(renamed from .json to upload here). Another interesting thing which I have seen today is , soon after "Charts" and "Slaves" tab failed to display live updates or stats values, I pressed the "reset stats" button on the top right, this made graphs to work again but from the time point after I pressed the reset button. This make our comparison with values before it fails difficult. Thought to share, if it helps

requests.txt

@heyman
Copy link
Member

heyman commented Mar 10, 2020

I managed to find the bug with the help of your requests.txt-file. We weren't properly escape:ing the failure messages and it has now been fixed in 3f9e0ad.

If you can not switch to running master (some large refactoring has gone into it, and its unlikely to be released very soon), you should be able to fix it by making sure that you don't output HTML in your failures (when using catch_response) or escape:ing it yourselves.

@heyman heyman closed this as completed Mar 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants