microservices-demo / load-test

A load-test script & container for Sock Shop
Apache License 2.0
50 stars 137 forks source link

JSON decoding error #2

Closed 2opremio closed 7 years ago

2opremio commented 7 years ago

After deploying the microservices-demo on ECS (with the cloud formation template) and making suer that the Stack finished creating, I proceeded to load-test the deployment with docker run weaveworksdemos/load-test -h host -c 2 -r 1000

It works for the most part, but I continuously get this error:


[2016-11-16 11:01:22,451] 4c4c9be0f3bf/ERROR/stderr: Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/locust/core.py", line 267, in run
    self.execute_next_task()
  File "/usr/local/lib/python2.7/site-packages/locust/core.py", line 293, in execute_next_task
    self.execute_task(task["callable"], *task["args"], **task["kwargs"])
  File "/usr/local/lib/python2.7/site-packages/locust/core.py", line 305, in execute_task
    task(self, *args, **kwargs)
  File "/config/locustfile.py", line 31, in purchaseItem
    self.createCustomer()
  File "/config/locustfile.py", line 83, in createCustomer
    self.cust_id = customer.json()["id"]
  File "/usr/local/lib/python2.7/site-packages/requests/models.py", line 826, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/local/lib/python2.7/json/__init__.py", line 339, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python2.7/json/decoder.py", line 364, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/lib/python2.7/json/decoder.py", line 382, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
2opremio commented 7 years ago

It seems to succeed for the most part. Here's a longer excerpt:

 Name                                                          # reqs      # fails     Avg     Min     Max  |  Median   req/s
--------------------------------------------------------------------------------------------------------------------------------------------
 GET /cart                                                         73     0(0.00%)     216     189     564  |     200    0.20
 POST /cart                                                        73     0(0.00%)     234     199     861  |     210    0.10
 GET /catalogue/images/WAT.jpg                                     11     0(0.00%)    3577    1134    6225  |    4000    0.00
 GET /catalogue/images/bit_of_leg_1.jpeg                            6     0(0.00%)     417     379     566  |     380    0.00
 GET /catalogue/images/catsocks.jpg                                10     0(0.00%)    2416    1126    5353  |    1800    0.00
 GET /catalogue/images/classic.jpg                                  6     0(0.00%)    1789    1315    2254  |    1800    0.00
 GET /catalogue/images/colourful_socks.jpg                         11     0(0.00%)    3628    1937    7208  |    3300    0.10
 GET /catalogue/images/cross_1.jpeg                                 9     0(0.00%)     809     566    1566  |     680    0.00
 GET /catalogue/images/holy_1.jpeg                                  6     0(0.00%)     668     564    1181  |     560    0.00
 GET /catalogue/images/puma_1.jpeg                                  9     0(0.00%)     608     564     757  |     570    0.00
 GET /catalogue/images/youtube_1.jpeg                               1     0(0.00%)     566     566     566  |     570    0.00
 GET /catalogue/size                                              141     0(0.00%)     232     185     723  |     200    0.30
 GET /catalogue?size=100                                          141     0(0.00%)     239     186     933  |     200    0.30
 GET /login                                                        56     0(0.00%)     231     187     634  |     190    0.00
 POST /orders                                                      73     0(0.00%)     232     183     790  |     190    0.10
 POST /register                                                   182     0(0.00%)     229     194     873  |     200    0.30
 GET /tags                                                         77     0(0.00%)     229     194     773  |     200    0.10
--------------------------------------------------------------------------------------------------------------------------------------------
 Total                                                            885     0(0.00%)                                       1.50

[2016-11-16 11:04:36,900] 4c4c9be0f3bf/ERROR/stderr: Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/locust/core.py", line 267, in run
    self.execute_next_task()
  File "/usr/local/lib/python2.7/site-packages/locust/core.py", line 293, in execute_next_task
    self.execute_task(task["callable"], *task["args"], **task["kwargs"])
  File "/usr/local/lib/python2.7/site-packages/locust/core.py", line 305, in execute_task
    task(self, *args, **kwargs)
  File "/config/locustfile.py", line 31, in purchaseItem
    self.createCustomer()
  File "/config/locustfile.py", line 83, in createCustomer
    self.cust_id = customer.json()["id"]
  File "/usr/local/lib/python2.7/site-packages/requests/models.py", line 826, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/local/lib/python2.7/json/__init__.py", line 339, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python2.7/json/decoder.py", line 364, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/lib/python2.7/json/decoder.py", line 382, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
 Name                                                          # reqs      # fails     Avg     Min     Max  |  Median   req/s
--------------------------------------------------------------------------------------------------------------------------------------------
 GET /cart                                                         74     0(0.00%)     215     189     564  |     200    0.10
 POST /cart                                                        73     0(0.00%)     234     199     861  |     210    0.20
 GET /catalogue/images/WAT.jpg                                     11     0(0.00%)    3577    1134    6225  |    4000    0.00
 GET /catalogue/images/bit_of_leg_1.jpeg                            6     0(0.00%)     417     379     566  |     380    0.00
 GET /catalogue/images/catsocks.jpg                                10     0(0.00%)    2416    1126    5353  |    1800    0.00
 GET /catalogue/images/classic.jpg                                  6     0(0.00%)    1789    1315    2254  |    1800    0.00
 GET /catalogue/images/colourful_socks.jpg                         11     0(0.00%)    3628    1937    7208  |    3300    0.10
 GET /catalogue/images/cross_1.jpeg                                 9     0(0.00%)     809     566    1566  |     680    0.00
 GET /catalogue/images/holy_1.jpeg                                  6     0(0.00%)     668     564    1181  |     560    0.00
 GET /catalogue/images/puma_1.jpeg                                  9     0(0.00%)     608     564     757  |     570    0.00
 GET /catalogue/images/youtube_1.jpeg                               1     0(0.00%)     566     566     566  |     570    0.00
 GET /catalogue/size                                              142     0(0.00%)     232     185     723  |     200    0.20
 GET /catalogue?size=100                                          143     0(0.00%)     239     186     933  |     200    0.20
 GET /login                                                        56     0(0.00%)     231     187     634  |     190    0.00
 POST /orders                                                      73     0(0.00%)     232     183     790  |     190    0.20
 POST /register                                                   183     0(0.00%)     228     194     873  |     200    0.30
 GET /tags                                                         77     0(0.00%)     229     194     773  |     200    0.10
--------------------------------------------------------------------------------------------------------------------------------------------
 Total                                                            890     0(0.00%)                                       1.40
errordeveloper commented 7 years ago

Closed via #3 and https://github.com/microservices-demo/front-end/pull/36.