【问题标题】:i am getting HTTPError('502 Server Error: Bad Gateway for 'https://myurl") using locust with python我在使用 locust 和 python 时收到 HTTPError('502 Server Error: Bad Gateway for 'https://myurl")
【发布时间】:2023-03-29 06:09:02
【问题描述】:

在执行 locust 负载测试时,我遇到了上述问题,并且我检查了我的应用程序洞察力,没有错误。所以请帮助我如何解决找到这个问题的确切原因

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

【问题讨论】:

    标签: python testing load-testing locust


    【解决方案1】:

    Locust 无法告诉您更多信息:您请求的服务器/URL 返回了 502 错误。您可以使用 print(r.url) 准确检查 URL locust 所针对的对象(如果它是 https://myurl 就像您在标题中所说的那样,那么这就是您的问题 :)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-11-10
      • 2018-04-23
      • 1970-01-01
      • 2021-02-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-08-03
      相关资源
      最近更新 更多