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? #323

Closed
datoug opened this issue Jan 12, 2016 · 3 comments
Closed

memory leak? #323

datoug opened this issue Jan 12, 2016 · 3 comments
Labels

Comments

@datoug
Copy link

datoug commented Jan 12, 2016

Our python application uses babel 1.3 and it has a memory leak. I used heapy to dump the objects that use the most memory, and it seems the strings are referenced from babel(core.py):

Index Count % Size % Cumulative % Referred Via:
0 14 0 642896 3 642896 3 "['languages']"
1 15 0 274536 1 917432 4 "['territories']"
2 14 0 224672 1 1142104 5 "['currency_names']"
3 804 1 219640 1 1361744 7 "['long']"
4 15 0 213096 1 1574840 8 "['meta_zones']"
5 14 0 195920 1 1770760 9 "['time_zones']"
6 19 0 157792 1 1928552 9 "['scripts']"
7 909 1 113712 1 2042264 10 "['other']"
8 832 1 103144 0 2145408 10 "['one']"
9 788 1 93512 0 2238920 11 "['standard']"

@akx
Copy link
Member

akx commented Jan 12, 2016

That's most definitely locale data.

I could see that happening if you repeatedly construct new Locale objects (either via the direct constructor Locale() or Locale.parse() (or any other method that might build Locales)) and stores references to them. Can you use Heapy to find out where Locale objects get referenced?

What sort of application is this? For instance, if it's a webapp, is it possible that each request is getting a new Locale in, say, a threadlocal dict which never gets cleaned up?

As an aside, PR #305 should make this impossible.

@akx
Copy link
Member

akx commented Apr 8, 2016

@datoug Still experiencing this problem? :)

@akx
Copy link
Member

akx commented Jan 17, 2018

Closing as abandoned.

@akx akx closed this as completed Jan 17, 2018
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