Proxyman icon indicating copy to clipboard operation
Proxyman copied to clipboard

Memory leaks when working for long time

Open nisimjoseph opened this issue 1 year ago • 9 comments

Description

First thing, thank you for a great product! we have developers working with this product for days, literary days for the ProxyMan is running. while running it loads memory and get to high amount of GB of memory that stuck the Mac.

Steps to Reproduce

  1. run the ProxyMan open for couple of hours or days.

Current Behavior

memory get too high and stuck the mac

Expected Behavior

if the ProxyMan get to a limit of rows, it need to dump the previous ones. for example, I will have default of 5000 lines and after those the 5001 and older will be deleted so the memory will be keep on reasonable range. the UI Preferences need to have the limit set or Unlimited for those who needs it.

Environment

  • App version: all versions
  • macOS version: e.g macOS Monterey

nisimjoseph avatar Feb 15 '24 15:02 nisimjoseph

I experienced this too on 4.16.0. I have "Auto Clean Up Resources If Memory Usage Is High" turned on in settings, but over a number of days the Proxyman process used up all the memory.

BjornRuud avatar Feb 21 '24 08:02 BjornRuud

@BjornRuud it's expected because Proxyman accumulates a lot of traffic for a number of days. You might Click on the Clear Session button to release unnecessary data.

NghiaTranUIT avatar Mar 02 '24 06:03 NghiaTranUIT

@NghiaTranUIT yes, but when you leave it off for a day because you didn't remember to turn it off, it gets to 20–40GB of memory usage. That doesn't make sense to me. I think you need to limit the data to 6 hours of accumulation and remove the rest. you can have a setting to make it accumulate forever, but it is supposed to be turned off by default.

nisimjoseph avatar Mar 02 '24 09:03 nisimjoseph

@nisimjoseph it depends on how many SSL items are in the Tool menu -> SSL Proxying List. By default, If there are no SSL Entries, Proxyman only proxies the data without holding the body.

If it has some wildcard (e.g. *) or Google Chrome in the SSL Proxying List, Proxyman will decrypt all HTTPS traffic and hold it in memory. So it might consume more RAM.

Can you double check and remove all SSL Entries and test it again for a day?

NghiaTranUIT avatar Mar 02 '24 09:03 NghiaTranUIT

@NghiaTranUIT I agree with this, but the Proxy domains are set only to the needed domains. and while developing, we have lots of network calls on our domains. I saw one computer totally stuck because of the 40GB memory the ProxyMan took only by handling our proxy traffic. It occurred to many Frontend developers, including me, because I forgot it open for 10 hours, got to 15GB memory.

nisimjoseph avatar Mar 02 '24 09:03 nisimjoseph

May I ask what Proxyman version you're using? From the v4.11.0 (released on Sep 13, 2023), I fixed a memory issue when each request has unnecessary 4 primitive locks => Causing huge memory usage.

NghiaTranUIT avatar Mar 02 '24 09:03 NghiaTranUIT

yes, I work with the latest, and I saw the issue in 4.16v as well. I use 5v, and tomorrow I will turn it on all day to check the memory usage for 8 hours.

nisimjoseph avatar Mar 02 '24 10:03 nisimjoseph

Fixed with the latest build v5.6.1 👍

NghiaTranUIT avatar Jul 23 '24 07:07 NghiaTranUIT

Hey @NghiaTranUIT,

I am on the latest version:

Proxyman Version 5.6.1 (50601) | macOS: Version 14.5 (Build 23F79)

I just updated to this version a couple of days ago, but still experiencing high memory usage eventually leading to the network and Proxyman being unresponsive in the background.

Screenshot showing system prompt to quit an app due to reaching memory limit: Screenshot 2024-07-26 at 4 25 58 AM

Unfortunately, I quit the app already. But if there are any dump or logs that I should be grabbing before quitting, feel free to let me know. I can do that if it happens again.

raxityo avatar Jul 26 '24 08:07 raxityo