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

Increasing memory usage? #223

Closed
slowbackspace opened this issue Mar 4, 2021 · 9 comments · Fixed by #254
Closed

Increasing memory usage? #223

slowbackspace opened this issue Mar 4, 2021 · 9 comments · Fixed by #254

Comments

@slowbackspace
Copy link

slowbackspace commented Mar 4, 2021

Bridge Version: 2.0.27 (downloaded and installed separately, running as /Applications/Utilities/TREZOR Bridge/trezord -l /Users/maros/Library/Logs/trezord.log )
OS: MacOS 11.2.2

I am not sure if it is legit, but activity monitor in macOS shows increasing memory usage of trezord process. It is not a first time I noticed it, but I can't give you ani specific steps to reproduce as I don't even know for how long is trezord running on my system.

Reported memory usage by activity monitor went from 180MB to 320MB in 20 hours.

Screenshot 2021-03-04 at 10 08 25

log.gz
trezord.log

@tsusanka
Copy link
Contributor

tsusanka commented Mar 4, 2021

I think @bosomt reported something similar? 🤔

@prusnak
Copy link
Member

prusnak commented Mar 4, 2021

Please test only soon-to-be released 2.0.31. This issue might have been fixed there.

@tsusanka
Copy link
Contributor

tsusanka commented Mar 4, 2021

I think @bosomt reported it on 2.0.31, let's wait for his comment.

@prusnak
Copy link
Member

prusnak commented Mar 4, 2021

Btw, this increase is most probably caused by logging. When you go to http://127.0.0.1:21325/status/ there is a log available and you can also download it as a text file. And this log is stored in the memory too.

nevermind, see below

@bosomt
Copy link
Contributor

bosomt commented Mar 4, 2021

@prusnak is it possible to start trezord with logging disabled ?

@prusnak
Copy link
Member

prusnak commented Mar 4, 2021

I just noticed the file log rotates after 20 MB and memory log rotates after 90000 lines (where each line can be max 500 characters) totalling at ~ 45 MB.

So logging should not consume that much memory.

(That's also the reason why there is no switch to disable the logging).

@iMilnb
Copy link

iMilnb commented Sep 18, 2021

Is this issue even looked at? 1.5G memory usage after 1 week. 2.0.27 is still the official version that's available to download.

@prusnak
Copy link
Member

prusnak commented Sep 18, 2021

Is this issue even looked at? 1.5G memory usage after 1 week. 2.0.27 is still the official version that's available to download.

We don't provide standalone installers of Bridge anymore. Please uninstall the standalone Bridge and use Trezor Suite which bundles the latest build of Bridge.

@k3a
Copy link

k3a commented May 10, 2022

trezord-go 2.0.31 on Arch Linux:

trezord      890  0.0  1.8 2704524 1196060 ?     Ssl  dub12  10:09 /usr/bin/trezord

VSZ 2704524
RSS 1196060 that's 1.1 GiB!

Quite a lot for such a tiny Go program.
You should consider adding pprof to help finding those leaks...

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

Successfully merging a pull request may close this issue.

6 participants