GNOME Bugzilla – Bug 696220
tries to save an unbounded number of avatars in parallel
Last modified: 2013-06-16 21:50:27 UTC
When run against 3 copies of a real address book where many contacts have avatars (via the FOLKS_TESTS_REAL_VCARDS environment variable), the test from Bug #696104 fails: Couldn't cache avatar for Edsf.Persona 'eds:test6:pas-id-514A00CC00000D7F': Error opening file '/tmp/tmp.x7By5PtrAC/.cache/folks/avatars/eds%3Atest6%3Apas-id-514A00CC00000D7F': Too many open files It appears that Edsf.Persona._update_avatar() doesn't take any steps to avoid trying to write out hundreds of avatars in parallel, resulting in running out of file descriptors. If Folks needs to maintain its own cache of avatars independently of e-d-s (does it really?), it should probably have a pipeline of some reasonable depth (1? 5? 10?) and queue any subsequent avatars to be cached afterwards.
Bumping, as this should be a fairly common scenario.
(In reply to comment #0) > If Folks needs to maintain its own cache of avatars independently of e-d-s > (does it really?), … The cache is needed because EDS can provide avatars as URIs, which we don’t want to have to keep downloading. If EDS provides an avatar as a file instead, we symlink (or hard link; I can’t remember) to it to avoid wasting disk space. Perhaps a better solution would be to ensure EDS caches all avatars (especially URI ones) on disk itself.
(In reply to comment #2) > Perhaps a better solution would be to ensure EDS caches all avatars (especially > URI ones) on disk itself. Accordingly, this is a dupe of bug #697695. *** This bug has been marked as a duplicate of bug 697695 ***