[GH-ISSUE #1742] Excessive memory consumption when reloading React Native bundle #1735

Closed
opened 2026-03-03 19:53:53 +03:00 by kerem · 4 comments
Owner

Originally created by @steemcb-phorest on GitHub (Aug 16, 2023).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1742

Originally assigned to: @NghiaTranUIT on GitHub.

Description

Hi, with the latest release of Proxyman it seems to be intercepting more traffic than previous versions when it comes to doing a hot reload of a React Native app. The bundle of the app we're developing is quite large and we're seeing that Proxyman is consuming roughly 3GB of memory per reload of the app meaning we can only run Proxyman for a short amount of time before the OS memory is exhausted. The traffic is being generated from a websocket URL like ws://localhost:9090/ - is there a recent change to Proxyman that could be causing this? This happens regardless of whether SSL proxying is turned on or not.

Screenshot 2023-08-16 at 15 07 43

Steps to Reproduce

  1. Create a react native project (we are using 68.5 but it shouldn't matter which version is used I think)
  2. Use an iOS simulator, run the app and do repeated hot reloading of the bundle (can be triggered by CMD+D and selecting reload in the debug menu)
  3. Observe that the memory footprint of Proxyman grows substantially with each reload

Current Behavior

Memory usage increases dramatically with each reload

Expected Behavior

There should be an ability for Proxyman to ignore this traffic as per previous versions

Environment

  • App version: Proxyman 4.9.1
  • macOS version: macOS Ventura 13.4.1
Originally created by @steemcb-phorest on GitHub (Aug 16, 2023). Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1742 Originally assigned to: @NghiaTranUIT on GitHub. ## Description Hi, with the latest release of Proxyman it seems to be intercepting more traffic than previous versions when it comes to doing a hot reload of a React Native app. The bundle of the app we're developing is quite large and we're seeing that Proxyman is consuming roughly 3GB of memory per reload of the app meaning we can only run Proxyman for a short amount of time before the OS memory is exhausted. The traffic is being generated from a websocket URL like `ws://localhost:9090/` - is there a recent change to Proxyman that could be causing this? This happens regardless of whether SSL proxying is turned on or not. <img width="1102" alt="Screenshot 2023-08-16 at 15 07 43" src="https://github.com/ProxymanApp/Proxyman/assets/70574674/fb9628b3-e540-4dcc-83b1-444f7177bb40"> ## Steps to Reproduce 1. Create a react native project (we are using 68.5 but it shouldn't matter which version is used I think) 2. Use an iOS simulator, run the app and do repeated hot reloading of the bundle (can be triggered by CMD+D and selecting reload in the debug menu) 3. Observe that the memory footprint of Proxyman grows substantially with each reload ## Current Behavior Memory usage increases dramatically with each reload ## Expected Behavior There should be an ability for Proxyman to ignore this traffic as per previous versions ## Environment - App version: Proxyman 4.9.1 - macOS version: macOS Ventura 13.4.1
kerem 2026-03-03 19:53:53 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@NghiaTranUIT commented on GitHub (Aug 17, 2023):

@steemcb-phorest look like there is an infinite loop when making a WS Request to port 9090, which is a port that Proxyman is listening to. Let me investigate it and fix it 👍

<!-- gh-comment-id:1681466413 --> @NghiaTranUIT commented on GitHub (Aug 17, 2023): @steemcb-phorest look like there is an infinite loop when making a WS Request to port 9090, which is a port that Proxyman is listening to. Let me investigate it and fix it 👍
Author
Owner

@NghiaTranUIT commented on GitHub (Aug 17, 2023):

@steemcb-phorest can you try this Beta build: https://download.proxyman.io/beta/Proxyman_4.9.1_Fix_infinite_loop_react_native.dmg

It detects the infinite loop (ws://localhost:9090) and breaks the loop. Let me know if it fixes your issue 👍

<!-- gh-comment-id:1681565714 --> @NghiaTranUIT commented on GitHub (Aug 17, 2023): @steemcb-phorest can you try this Beta build: https://download.proxyman.io/beta/Proxyman_4.9.1_Fix_infinite_loop_react_native.dmg It detects the infinite loop (`ws://localhost:9090`) and breaks the loop. Let me know if it fixes your issue 👍
Author
Owner

@steemcb-phorest commented on GitHub (Aug 17, 2023):

Hi @NghiaTranUIT thanks so much for looking at this so quickly, the fix seems to work! Do you know when this could be released in an official build?

<!-- gh-comment-id:1682350546 --> @steemcb-phorest commented on GitHub (Aug 17, 2023): Hi @NghiaTranUIT thanks so much for looking at this so quickly, the fix seems to work! Do you know when this could be released in an official build?
Author
Owner

@NghiaTranUIT commented on GitHub (Aug 17, 2023):

Maybe 1-2 weeks. You can safely use the Beta build without any problems.

<!-- gh-comment-id:1682577224 --> @NghiaTranUIT commented on GitHub (Aug 17, 2023): Maybe 1-2 weeks. You can safely use the Beta build without any problems.
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#1735
No description provided.