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

Memory Leak On Other Computers #848

Closed
root426 opened this issue Jun 27, 2016 · 3 comments
Closed

Memory Leak On Other Computers #848

root426 opened this issue Jun 27, 2016 · 3 comments
Labels

Comments

@root426
Copy link

root426 commented Jun 27, 2016

Hi, i have coded server-client application on python 3.4
i used cx_freeze for distrubate. When i open client app on other computer it will graudally eat memory
is this a bug or something ?

@root426
Copy link
Author

root426 commented Jun 27, 2016

actually i found solution.

theory I : if you use psutil.net_io_counters() alone, the garbage collector wont collect rest of the information.
exp.

a=psutil.net_io_counters(pernic=True)
time.sleep(1)
b=psutil.net_io_counters(pernic=True)
downspeed = a[1]-b[1]

if i write the code above there will be memory leak

 a1 = psutil.net_io_counters(pernic=False).bytes_recv
    b1 = psutil.net_io_counters(pernic=False).bytes_sent
    time.sleep(1)
    a2 = psutil.net_io_counters(pernic=False).bytes_recv
    b2 = psutil.net_io_counters(pernic=False).bytes_sent

downspeed = a2-a1

if i write like this then there will be no memory leak :)

@giampaolo
Copy link
Owner

I am not sure what you're talking about. What do you mean by memory leak? You're using a NET IO related API so that's why I'm not sure what you mean by that.

@root426
Copy link
Author

root426 commented Jul 4, 2016

i mean my program's ram usage always increase. like at start 7.2 MB after 10 min 30.3 MB and it's not stopping.

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

No branches or pull requests

2 participants