-
Notifications
You must be signed in to change notification settings - Fork 3k
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
gevent error when locust server started and browse the website #1142
Comments
Please post a minimal reproducible code example. |
|
That code works perfectly fine for me (once I add imports), so it sounds like there's some issue with your environment. |
I know this is an old ticket but I want to bump it anyway. I got this error today on a code base that did not exhibit this issue on Friday last week, but does today on Monday morning. The issue presents itself before the swarm has been launched so I do not think it is in error in my own code. I haven't changed locust version, nor any other version. This just came out of nowhere as far as I can tell.
The logged errors just keep coming at about 1 line per second until I terminate the process. I am on Apple silicon, running MacOS 11.6 (20G165) (Big Sur) |
Rebooting my system and then running the exact same code again made the problem go away (for whoever searches for this issue and might come across this message. Sorry I couldn't offer you a better "solution" than to reboot). |
And now it is back again. The code still runs OK but the Weird issue. |
For some reason I was on an old version ( I get the exact same issue with the newer version of Locust. At this point I am guessing gevent or something Apple silicone related. I don't know how I keep hitting all these rare edge cases but for some reason I do. |
@lundstrj I just debugged this same error message with someone and it turned out they had a config error. They has set the worker's master-port setting to use the WEB_UI port (8089) instead of using the expected/default bind port (5557). Not sure why this was the error in that case, but it went away when they corrected that config issue. |
@lolwhitaker thanks for reaching out. I haven't change my worker's master-port but I do have the default 8089 for the web_ui. I'll see if I can locate the setting for the worker master port and see if fiddling with it will help. What I don't get is why this problem temporarily goes away after I reboot, only to resurface again a little bit later in the day. Searching doesn't yield much but I wonder if it could be related to certificates perhaps? |
Assuming I used that flag correctly, it didn't fix my problem =/ |
@heyman Sorry to bother you but maybe we could reopen this and try to work together to find a fix? I'd be happy to try things and provide data if it could help in anyway? |
See if you can reproduce it with just gevent + requests (it is unlikely that it is caused by locust itself). Maybe they have seen similar issues.. As a workaround, you can also try using FastHttpUser instead and see if it works better. |
I’ll re-close this soon if there are no more details. |
@cyberw Hello, I'm sorry, I missed that you reopened this (no notification for some reason). I was using FastHttpUser already. I could have tried to switch to the regular HttpUser and see if that has an effect. I have done a fair bit of searching for gevent issues that look similar to this one and the closest I could find (naturally I've lost the link) hinted that it could be a certificate related issue (Python does not use the system certificates but instead has it's own certificate handling). I tried any and all suggested solutions related to running straight up requests (without gevent) without having to set Then one day these Unfortunately I don't know what I did (if anything) that caused this to stop occurring (but stop it did) and that does bother me a bit. If this issue rears it's head again, I can attempt to make a minimal gevent + requests implementation to try to get the same issue (I do try to give back to the communities around the tools I use, it is the least I can do). To whoever arrived here, having this same issue, hoping there would be a solution or a workaround. I suggest investigating if this could indeed be due to how Python handles ssl certificates. It is my current best guess. Maybe throw in a few reboots in there too for good measure? |
Thanks for the update! |
I just ran into this issue today. Basically, nothing gets sent once this error occurs on master. Here's an actual output from the logs. I get about 3 of these during startup. Since I'm running in Azure Container Instances, I took the 'reboot' fix advice above and simply redeployed my infrastructure. That fixed it on the first go. Using Locust 2.1.0, but will likely upgrade now that I'm seeing this issue. (I hadn't changed any code or my underlying container, so not sure why this popped up.) |
Same here - I just upgrade Locust + gevent to the latest version to avoid gevent issue, but the problem mentioned in this topic still exists - in my case there are 3 different messages.
+ there is something like this after the last error:
|
I've also faced this issue. The problem on my side was that I was accessing the server using https ( |
### NOO way THIS was the problem all along thnx @wangonya appretiate it so much. |
Describe the bug
When I started the locust server then I browse the website, the log is:
Environment settings
The text was updated successfully, but these errors were encountered: