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

Reduce memory usage when importing all Flickr photos #148

Open
philgyford opened this issue Jul 13, 2016 · 0 comments
Open

Reduce memory usage when importing all Flickr photos #148

philgyford opened this issue Jul 13, 2016 · 0 comments

Comments

@philgyford
Copy link
Owner

Running ./manage.py fetch_flickr_photos --days=all on a 512MB Digital Ocean box ended up with the process being killed after importing about 1500 photos. Works fine on my MacBook.

Running ps aux | grep 'python' while it runs shows the RSS usage continuing to grow as the script runs (from about 46,000 to 87,000 on my MacBook).

I rejigged ditto/flickr/fetch/fetchers.py to save photo data after fetching a page of photos (500 photos), rather than storing all the data up and saving it all at the end, but that doesn't seem to change much.

I tried poking around in ditto/flickr/fetch/fetchers.py with a couple of memory profiling things, but couldn't see anything that was growing, that didn't reset after starting a subsequent page of photos.

I'm stumped, so leaving this for now.

philgyford added a commit that referenced this issue Jul 13, 2016
Rather than fetching all the data and then saving the Photos, save them after
fetching a single page (500 photos).

An attempt to reduce the memory usage, but I don't think it achieved anything.

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

No branches or pull requests

1 participant