简体   繁体   English

我在 python 中使用 Locust 时收到 HTTPError('502 服务器错误:'https://myurl' 的错误网关)

[英]i am getting HTTPError('502 Server Error: Bad Gateway for 'https://myurl") using locust with python

while executing locust load test i have faced the mentioned issue and I have checked in my application insights there is no errors.在执行蝗虫负载测试时,我遇到了上述问题,并且我检查了我的应用程序洞察力,没有发现任何错误。 so please help me how to resolve find the exact cause of this issue所以请帮我解决这个问题的确切原因

    @task(1)
        def test(self):
            r = self.client.post("url",data=json.dumps(payload), headers=headers, catch_response=False)
            self.interrupt()

There is not a lot more Locust can tell you: the server/URL you requested returned a 502 error. Locust 没有更多信息可以告诉您:您请求的服务器/URL 返回了 502 错误。 You can check exactly what URL locust ran against using print(r.url) (if it is literally https://myurl like you say in the title then that is your problem:)您可以使用print(r.url)准确检查 URL 蝗虫针对的是什么(如果字面意思是https://myurl就像您在标题中所说的那样,那就是您的问题:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我收到urllib2.HTTPError:HTTP错误502:错误的网关 - I am getting urllib2.HTTPError: HTTP Error 502: Bad Gateway urllib.error.HTTPError: HTTP 错误 502: 网关错误 PYTHON - urllib.error.HTTPError: HTTP Error 502: Bad Gateway PYTHON AWS使用python flask不断返回502错误的网关错误 - aws keep returning 502 bad gateway error using python flask Firebase 502服务器错误:网关错误 - Firebase 502 Server Error: Bad Gateway Locust 测试返回不频繁的“502:错误网关”错误的短时间爆发 - Locust tests returning infrequent short bursts of “502: Bad Gateway” errors Python 自定义函数未在裂变日志中调用错误 502 错误网关 - Python custom functions not getting called in fission logs error 502 bad gateway 收到502 Bad Gateway错误并通过django,nginx,gunicorn发送电子邮件 - Getting 502 Bad Gateway error and sending a email with django, nginx, gunicorn 502错误的网关错误与运行uwsgi和nginx的python应用程序(centos) - 502 Bad Gateway error with python app running uwsgi and nginx (centos) Nginx / Flask / Python应用程序,Nginx抛出502 Bad Gateway错误 - Nginx/Flask/Python App, Nginx throwing 502 Bad Gateway Error Python 中的 Selenium + Flask/Falcon - 502 错误网关错误 - Selenium + Flask/Falcon in Python - 502 Bad Gateway Error
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM