Comment 6 for bug 1224410

Revision history for this message
Jussi Pakkanen (jpakkane) wrote :

The last one of these is correct. So what happens is that there is the directory /tmp/grilo-plugin-cache-XXXX. When new files are downloaded, libsoup puts them in that directory _and_ keeps an open file descriptor to each written file. So, for example, if there are three files in the directory, libsoup will have three open file descriptors. When there are too many files in the cache, the fd limit is reached and no new files can be opened.

There is no way to tell libsoup to close the fds it keeps open that I can see. Unless libsoup is fixed there are only two ways to work around this:

- do not use libsoup's cache at all
- make the cache small enough so that the fd limit is not reached

In the case of last.fm plugin the XML files it downloads are around 3 kB. Reducing the cache size to 1 MB means that libsoup will keep roughly ~300 open files. The fd limit on a standard install is 1024 so this will prevent fd starvation.