[GH-ISSUE #1330] Memory leak #1323

Open
opened 2026-03-03 19:50:29 +03:00 by kerem · 10 comments
Owner

Originally created by @johnrogers on GitHub (Aug 12, 2022).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1330

Originally assigned to: @NghiaTranUIT on GitHub.

Proxyman version? (Ex. Proxyman 1.4.3)

3.8.0

macOS Version? (Ex. mac 10.14)

12.5

Steps to reproduce

Keep the app running for a while

Expected behavior

The app doesn't chew up all of my memory

Screenshots (optional)

image
Originally created by @johnrogers on GitHub (Aug 12, 2022). Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1330 Originally assigned to: @NghiaTranUIT on GitHub. ### Proxyman version? (Ex. Proxyman 1.4.3) 3.8.0 ### macOS Version? (Ex. mac 10.14) 12.5 ### Steps to reproduce Keep the app running for a while ### Expected behavior The app doesn't chew up all of my memory ### Screenshots (optional) <img width="744" alt="image" src="https://user-images.githubusercontent.com/998649/184282634-5f4b4793-889f-4942-83b2-bd1710efaeb1.png">
Author
Owner

@NghiaTranUIT commented on GitHub (Aug 12, 2022):

Thanks. It's a known issue. Just wondering: Do you use * or Google Chrome/Safari on Tool menu -> SSL Proxying List 🤔

Ref: https://docs.proxyman.io/troubleshooting/proxyman-consumes-too-much-ram-and-unresponsive

<!-- gh-comment-id:1212708473 --> @NghiaTranUIT commented on GitHub (Aug 12, 2022): Thanks. It's a known issue. Just wondering: Do you use `*` or Google Chrome/Safari on Tool menu -> SSL Proxying List 🤔 Ref: https://docs.proxyman.io/troubleshooting/proxyman-consumes-too-much-ram-and-unresponsive
Author
Owner

@matt-wood23 commented on GitHub (Jan 1, 2023):

Is there any update on this issue? Seems to also occur when attempting to save captured sessions:

image

<!-- gh-comment-id:1368555258 --> @matt-wood23 commented on GitHub (Jan 1, 2023): Is there any update on this issue? Seems to also occur when attempting to save captured sessions: ![image](https://user-images.githubusercontent.com/15916754/210186659-31a2ecf7-4fb5-4b5d-9af4-1f71693179e5.png)
Author
Owner

@NghiaTranUIT commented on GitHub (Jan 2, 2023):

Thanks. I'm working on the Export Session v2 to make sure it uses less memory 👍

<!-- gh-comment-id:1368591976 --> @NghiaTranUIT commented on GitHub (Jan 2, 2023): Thanks. I'm working on the Export Session v2 to make sure it uses less memory 👍
Author
Owner

@NghiaTranUIT commented on GitHub (Jan 5, 2023):

@johnrogers if you don't mind, you can try this Beta build: https://github.com/ProxymanApp/Proxyman/issues/1111#issuecomment-1371882258

<!-- gh-comment-id:1371882530 --> @NghiaTranUIT commented on GitHub (Jan 5, 2023): @johnrogers if you don't mind, you can try this Beta build: https://github.com/ProxymanApp/Proxyman/issues/1111#issuecomment-1371882258
Author
Owner

@christos commented on GitHub (Jan 15, 2023):

Similar issue here. I am on Version 4.0.0 (40000)

I am using Proxyman to proxy an iOS simulator with a React Native app to my local web server.

I've spotted a pattern. When the app hits the React server running locally via websockets ws://localhost:9090/ to load the code bundles, I see around 1K request per GB of memory used. See video.

Doesn't seem to happen with regular HTTP proxying, as far as I can tell. And the websocket response is tiny. It is just an upgrade response.

https://user-images.githubusercontent.com/736/212537123-86fb6726-e5ae-48c4-97ca-9b1b7ccb8d5b.mp4

ScreenShot 2023-01-15 at 12 08 56@2x

<!-- gh-comment-id:1383121884 --> @christos commented on GitHub (Jan 15, 2023): Similar issue here. I am on `Version 4.0.0 (40000)` I am using Proxyman to proxy an iOS simulator with a React Native app to my local web server. I've spotted a pattern. When the app hits the React server running locally via websockets `ws://localhost:9090/` to load the code bundles, I see around 1K request per GB of memory used. See video. Doesn't seem to happen with regular HTTP proxying, as far as I can tell. And the websocket response is tiny. It is just an upgrade response. https://user-images.githubusercontent.com/736/212537123-86fb6726-e5ae-48c4-97ca-9b1b7ccb8d5b.mp4 ![ScreenShot 2023-01-15 at 12 08 56@2x](https://user-images.githubusercontent.com/736/212537211-f8b549bc-a630-43eb-9ff2-71da043d0f83.png)
Author
Owner

@NghiaTranUIT commented on GitHub (Jan 15, 2023):

Port 9090 is listening by Proxyman.

I'm not sure why you want to connect to locahost:9090, which is what Proxyman is listening 🤔

If you'd like to capture the WS traffic, you should connect to your WS server, e.g localhost:3000 (if you have a WS server at port 3000). If you use Google Chrome, it automatically proxies to Proxyman at port 9090.

The issue you reports is a loop issue. I'm going to fix it now 👍

<!-- gh-comment-id:1383177390 --> @NghiaTranUIT commented on GitHub (Jan 15, 2023): Port 9090 is listening by Proxyman. I'm not sure why you want to connect to locahost:9090, which is what Proxyman is listening 🤔 If you'd like to capture the WS traffic, you should connect to your WS server, e.g localhost:3000 (if you have a WS server at port 3000). If you use Google Chrome, it automatically proxies to Proxyman at port 9090. The issue you reports is a loop issue. I'm going to fix it now 👍
Author
Owner

@christos commented on GitHub (Jan 15, 2023):

Port 9090 is listening by Proxyman.

OK. Then this is weird then. The source of that ws: request seems to be my app running in the iOS simulator as it appears under the Apps section in the sidebar.

I wrongly assumed that the Metro React Native Bundler was the source of those requests. It is not. Metro listens on http://localhost:8081

I'll wait for a build with your loop fix and see if this is what causes the memory leak too.

<!-- gh-comment-id:1383210938 --> @christos commented on GitHub (Jan 15, 2023): > Port 9090 is listening by Proxyman. OK. Then this is weird then. The source of that `ws:` request seems to be my app running in the iOS simulator as it appears under the `Apps` section in the sidebar. I wrongly assumed that the [Metro React Native Bundler](https://facebook.github.io/metro/) was the source of those requests. It is not. Metro listens on `http://localhost:8081` I'll wait for a build with your loop fix and see if this is what causes the memory leak too.
Author
Owner

@johnrogers commented on GitHub (Jan 15, 2023):

@johnrogers if you don't mind, you can try this Beta build: #1111 (comment)

Apologies for not getting back to you sooner. Are the fixes above included in 4.0.0? I have to that and I will let you know if the issue occurs again. It has not happened recently but I must admit that I haven't had to use Proxyman very frequently as I haven't been working on much networking stuff.

Thanks. It's a known issue. Just wondering: Do you use * or Google Chrome/Safari on Tool menu -> SSL Proxying List 🤔

Ref: https://docs.proxyman.io/troubleshooting/proxyman-consumes-too-much-ram-and-unresponsive

No *.

<!-- gh-comment-id:1383265527 --> @johnrogers commented on GitHub (Jan 15, 2023): > @johnrogers if you don't mind, you can try this Beta build: [#1111 (comment)](https://github.com/ProxymanApp/Proxyman/issues/1111#issuecomment-1371882258) Apologies for not getting back to you sooner. Are the fixes above included in 4.0.0? I have to that and I will let you know if the issue occurs again. It has not happened recently but I must admit that I haven't had to use Proxyman very frequently as I haven't been working on much networking stuff. > Thanks. It's a known issue. Just wondering: Do you use `*` or Google Chrome/Safari on Tool menu -> SSL Proxying List 🤔 > > Ref: https://docs.proxyman.io/troubleshooting/proxyman-consumes-too-much-ram-and-unresponsive No `*`.
Author
Owner

@NghiaTranUIT commented on GitHub (Jan 16, 2023):

Port 9090 is listening by Proxyman.

OK. Then this is weird then. The source of that ws: request seems to be my app running in the iOS simulator as it appears under the Apps section in the sidebar.

I wrongly assumed that the Metro React Native Bundler was the source of those requests. It is not. Metro listens on http://localhost:8081

I'll wait for a build with your loop fix and see if this is what causes the memory leak too.

Can you show me how to reproduce it? I access http://localhost:9090 on web browser, but it doesn't cause the loop.

I'm not sure how to setup the Metro?

<!-- gh-comment-id:1383659619 --> @NghiaTranUIT commented on GitHub (Jan 16, 2023): > > Port 9090 is listening by Proxyman. > > OK. Then this is weird then. The source of that `ws:` request seems to be my app running in the iOS simulator as it appears under the `Apps` section in the sidebar. > > I wrongly assumed that the [Metro React Native Bundler](https://facebook.github.io/metro/) was the source of those requests. It is not. Metro listens on `http://localhost:8081` > > I'll wait for a build with your loop fix and see if this is what causes the memory leak too. Can you show me how to reproduce it? I access `http://localhost:9090` on web browser, but it doesn't cause the loop. I'm not sure how to setup the Metro?
Author
Owner

@christos commented on GitHub (Jan 16, 2023):

Can you show me how to reproduce it? I access http://localhost:9090 on web browser, but it doesn't cause the loop.

I am having a hard time reproducing it in a simplified manner. My setup is quite complex. I can't quite tell who accesses ws://loclahost:9090. It seems as it might be the iOS simulator but in the Proxyman Apps list, the source of that request loop is Proxyman itself.

The trigger for the loop is when the React Native app running in the iOS simulator is reloaded and so asks the Metro bundling server for the javascript files it needs. That in theory should be a simple request to http://localhost:8081 and no websockets involved. I am guessing since the requests to http://localhost:8081 go through the macOS proxy, maybe that is what triggers the loop somehow?

I managed to "fix" the bug by changing the proxy port in Proxyman's settings to 9091 — The loop no longer happens. I don't understand why either.

<!-- gh-comment-id:1383755610 --> @christos commented on GitHub (Jan 16, 2023): > Can you show me how to reproduce it? I access http://localhost:9090 on web browser, but it doesn't cause the loop. I am having a hard time reproducing it in a simplified manner. My setup is quite complex. I can't quite tell who accesses `ws://loclahost:9090`. It seems as it might be the iOS simulator but in the Proxyman Apps list, the source of that request loop is `Proxyman` itself. The trigger for the loop is when the React Native app running in the iOS simulator is reloaded and so asks the Metro bundling server for the javascript files it needs. That in theory should be a simple request to `http://localhost:8081` and no websockets involved. I am guessing since the requests to `http://localhost:8081` go through the macOS proxy, maybe that is what triggers the loop somehow? I managed to "fix" the bug by changing the proxy port in Proxyman's settings to `9091` — The loop no longer happens. I don't understand why either.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Proxyman#1323
No description provided.