Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Excessive RAM Usage #148

Closed
mr-sp0ck opened this issue Jan 30, 2024 · 15 comments
Closed

Excessive RAM Usage #148

mr-sp0ck opened this issue Jan 30, 2024 · 15 comments
Assignees

Comments

@mr-sp0ck
Copy link

The app has a tendency to manifest overly excessive RAM usage (sometimes up to 100%), whenever a (FineVPN) tunnel expires.

Commonsense could assume that, this particular behavior, is attributed to the verbose Connection logging, due to the aforementioned anomaly.

@brendanosborne
Copy link
Contributor

Can you clarify the following:

whenever a (FineVPN) tunnel expires.

What Log setting are you using?

@mr-sp0ck
Copy link
Author

Connection Status (default)

@brendanosborne
Copy link
Contributor

brendanosborne commented Jan 30, 2024

When you opened the issue was there a template with troubleshooting steps? It lays out some information that helps to diagnose issues.

@mr-sp0ck
Copy link
Author

I am currently using the App on Windows 10, with the FineVPN WireGuard configuration, for torrenting.

It is also possible that, such a devastating number of connections errors, at that point, could lead to aforementioned behavior.

@brendanosborne
Copy link
Contributor

I can't help if you don't provide relevant data. If you would like assistance, please open an issue and fill in the template which asks for things like screenshots and testing on the standard Wireguard application. This is a free app, you'll need to put some effort in at your end.

@mr-sp0ck
Copy link
Author

Ok. I will try to get a screenshot, in the next 20+ days, upon the next tunnel expiry.

@runner1409
Copy link

Connection Status Logs
Screenshot 2024-03-30 022656
it remains the same after enabling "Show All Logs" because logging is not updated.

After Disable/Enable on the Tunnel.
Screenshot 2024-03-30 023136

It just keeps using more and more RAM.
Screenshot 2024-03-30 023302
Screenshot 2024-03-30 023435
Takes less than 5 minutes to get to 16GB of ram. After 4-5GB the program can no longer be accessed. End Task is required.
SOLUTION: End Task, Run TunnlTo, Disable logging by going to settings, Show Connection Logs, Disable/Enable Tunnel.

@mr-sp0ck
Copy link
Author

Actually, I get excessive RAM usage with 'Connection Status (default)' selected.

It only happens though, whenever my 30-day FineVPN WireGuard tunnel expires.

Commonsense can easily be applied then, to extrapolate that, this is more than likely due to the fact that, at this point, there is an overly excessive amount of verbose error logging taking place, due to infinite unsuccessful handshakes.

@runner1409
Copy link

That means that the logging itself is what's causing this issue, like the actual log entries, and it's not an issue with improper logging done by the "Show all logs" feature.

One thing I don't understand is why there are 6 edge instances running. the 2 at the top are the ones hogging all the ram, worse than chrome, so that means that this is about the way logging is done.

@mr-sp0ck
Copy link
Author

Apps have a tendency to launch multiple instance of itself, for whatever reason(s):

  • communicating with other processes
  • linking with libraries,
  • etc.

Obviously, the two instances hogging the RAM, are the ones that are immediately being used by the app.

Edge WebView2 is a framework, so all this is understandable. Think implementing features of a web browser, without using a whole web browser.

@mr-sp0ck
Copy link
Author

With the app running normally, pay attention to the minimum number of instances of Edge WebView2, that it seems to invoke

VPN

@mr-sp0ck
Copy link
Author

Also, pay attention to the fact that, it is the first three main instances of Edge WebView2 that seems to do all the work, hence, the main windows of TunnlTo, hence a logging fault.

@runner1409
Copy link

If you close the edge instances that use a lot of ram, the app will continue to function, but you won't get anything displayed on it.
So using edge for everything from rendering the app to logging is obviously what's causing this issue.
I've had it running since yesterday, without any problems. If handshakes do start to fail, then I will probably see an increase in ram usage.

Possible dev solution is to keep everything running with edge EXCEPT the logging itself, as well as the logging display and switch that to something more basic?
Possibly add some settings for logs to be capped at xMB, daily logs, keep logs for x days, keep max x entries in the log.

@mr-sp0ck
Copy link
Author

mr-sp0ck commented Mar 30, 2024

I mentioned that precise solution in another Feature Request #149 , which is, adding the option to display connection errors only, but the dev's reply implied that, it is technically impossible, being that Wiresock is being run as an external process.

The memory hogging issue seems to arise from the fact that, Edge WebView2 is more HTML-based, rather than text-based (right-click the log window and 'Save as').

Your other suggestions make 100% sense BTW.

Also, another logical dev move, would be to suspend logging, as long as the handshake is unsuccessful, and indicate as such, until normal resumption.

@brendanosborne
Copy link
Contributor

This should now be resolved in version 1.0.7 where I have implemented a log limit that can be adjusted in settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants