26

I'm using Locust.io to load test an application. I will get a random error that I am unable to pinpoint the problem:

1) ConnectionError(ProtocolError(\'Connection aborted.\', BadStatusLine("\'\'",)),)

2) ConnectionError(ProtocolError('Connection aborted.', error(104, 'Connection reset by peer')),)

The first one is the one that happens a few times every 1,000,000 requests or so and seems to happen in groups where there will be 5-20 all at once and then it is fine. the second only happens every couple days or so.

The CPU and memory are well below all the servers max load for the database server, app server, and the machine running locust.io.

The servers are medium-sized Linode servers running Ubuntu 14.04. The app is Django and the database in PostgreSQL. I have already increased the maximum open file limit but am wondering if something else needs to be increased on the server that could be leading to the occasional errors.

From what I have been able to gather from searching the error is that it might have something to do with the python requests library.

-Any help would be greatly appreciated.

Aviv Yaniv
  • 6,188
  • 3
  • 7
  • 22
arcane
  • 457
  • 6
  • 10
  • The second one comes after client or server closes the tcp connection after a while client being silent but dont face the first one. – Mesut GUNES Oct 05 '15 at 13:51
  • 5
    Did you by any chance figure out what the problem was? I am getting the same error when testing and it happens when I hit around 300 RPS. All server resource usage stats are well below the limits so I think it is something related to locust or python. – Arash Dec 12 '15 at 20:56
  • I have the same error - usually I'm getting this when running with more than 100 locusts. – ramius May 25 '16 at 14:01
  • What are you using to serve the Django app, e.g., Gunicorn behind nginx? Any chance your maximum number of connections is reached there? – somada141 Jun 04 '18 at 21:09
  • Same issue here. Did anyone find an answer? – Red Aug 13 '18 at 19:04

1 Answers1

2

BadStatusLine is most likely a server side issue. See for example this answer https://stackoverflow.com/a/1767954/1591921 It could be some sort of flood/DoS protection on the server.

Connection reset by peer could also be any number of things, but it is most likely a server/network issue, not an issue on the loadgen side (perhaps connections are idle for too long, or there is a max connection age somewhere)

I dont think there are any general answers to this question, it all depends on your system under test.

Cyberwiz
  • 11,027
  • 3
  • 20
  • 40