Mitmoproxy Stops Accepting new connections after an hour

Having issues with Mitmproxy where it stops accepting new connections after a given amount of time/traffic. Right now we are running different VMs to take on the load, but they all seem to have this issue. The one with the most devices (around 60) seems to be having the biggest problems keeping up and running.

What are are noticing is the following:

  1. The proxy works for about an hour more/less depending on the amount of devices/traffic
  2. The proxy then starts to slow down and finally stops taking on new connections
  3. Connections/streams that are still open/running continue to work for a while
  4. After a while those connections/streams stop working as well

We tried to different OS and system hardware to fix the problem but to no luck. We also check system logs, firewalls, and everything else we could think of. We had squid running on another box that is handling a lot more devices with no problems with less hardware than mitmproxy is running on. RAM and CPU usage looks normal before and after except that the usage drops when it goes into this “dead lock state”.

We are looking for a solution to the problem, so if there is anything we can pull log wise to get this problem fix we be more than happen to work with someone here. As far as we can tell - it seems to be with mimproxy or with our script (because no one else seems to be reporting an issue like this) or we’re doing something wrong here.

I reported similar issues before here: and try to link the ones with the same sounding issue as mine. But if we can’t get this to work with mimtproxy, is there another proxy like software we might be able to try as well that is python base?


I drafted a reply to your GitHub issue ( which I forgot to submit when getting internet connectivity again. Let’s continue in the GitHub thread. Sorry!

@mhils - Would the mitmproxy team consider accepting payments/donations to solve certain issues ?

@rbjobs: That’s generally something we’d be open to - depends on the specifics. Feel free to shoot me an email.