"Too many files open" error and losing all torrents

General support for problems installing or using Deluge
Post Reply
Maycne Sonahoz
New User
New User
Posts: 3
Joined: Wed Aug 31, 2016 5:07 pm

"Too many files open" error and losing all torrents

Post by Maycne Sonahoz »

Hi,

A few weeks ago i got an important issue: Deluge lost all my torrents. More precisely, the torrent list got empty, though the files and torrent files were still there. After a small investigation, i found out that the ~/.conf/deluge/state/torrents.state and torrents.state.bak files had been deleted. After opening Deluge again, from the terminal, after some time i got errors of the following kind:

Code: Select all

[ERROR ] 19:43:26 torrentmanager:833 Unable to save /home/maycne/.config/deluge/state/torrents.fastresume: [Errno 24] Trop de fichiers ouverts: '/home/maycne/.config/deluge/state/torrents.fastresume.tmp'
[ERROR ] 19:43:32 core:248 There was an error adding the torrent file ed965dd1d26331357302f877482526e90c0d0515.torrent
[ERROR ] 19:43:32 core:249 local variable 'ex' referenced before assignment
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/deluge/core/core.py", line 246, in add_torrent_file
File "/usr/lib/python2.7/site-packages/deluge/core/torrentmanager.py", line 534, in add
File "/usr/lib/python2.7/site-packages/deluge/core/torrentmanager.py", line 744, in save_state
UnboundLocalError: local variable 'ex' referenced before assignment
[ERROR ] 19:43:33 torrentmanager:833 Unable to save /home/maycne/.config/deluge/state/torrents.fastresume: [Errno 24] Trop de fichiers ouverts: '/home/maycne/.config/deluge/state/torrents.fastresume.tmp'
[ERROR ] 19:43:46 torrentmanager:734 Unable to backup /home/maycne/.config/deluge/state/torrents.state to /home/maycne/.config/deluge/state/torrents.state.bak: [Errno 2] Aucun fichier ou dossier de ce type
For those who don't read French, "Trop de fichiers ouverts" means "too many files open".

I saw some posts about this error here, either with no solution, or with a solution of "don't use so many torrents" or "increase the limit of files your system can open". Those were also the solutions suggested on Manjaro's forum at first.

But after digging a bit, i found that Deluge opens a lot more files than any other programs, including other torrent clients. Long story short, i found and used the following command in order to look how many files were open.

Code: Select all

lsof | awk '{ print $2 " " $1; }' | sort -rn | uniq -c | sort -rn | head -20
Using this with Deluge and Qbittorrent open, both with the exact same list of 83 torrents (all completed), i saw that after around 45min of activity, Deluge had 7 times more open files than Qbittorrent (14880 and 2037 respectively), which might not be normal.

I use Deluge 1.3.13-1 (commit 226346311412c164cfb5e467d04b1ee8627bc015 : https://git.archlinux.org/svntogit/pack ... ges/deluge) and i have the issue with libtorrent-rasterbar at both versions 1:1.0.9-1 and 1:1.1-3. I might have had this issue for longer, but i only found it after losing the torrent list.
You can find more details on Manjaro's forum (https://forum.manjaro.org/t/deluge-repe ... -open/7566) and i'll gladly provide more intel if you have any ideas.

Maycne.
Maycne Sonahoz
New User
New User
Posts: 3
Joined: Wed Aug 31, 2016 5:07 pm

Re: "Too many files open" error and losing all torrents

Post by Maycne Sonahoz »

Since there is no response, i assume there is a real issue behind this.
I'm willing to create a ticket, but should i create one for the whole, or separate the "too many files open" part from the "losing all torrents" part?

Edit: No response, i created the ticket.
http://dev.deluge-torrent.org/ticket/2889
chrishirst

Re: "Too many files open" error and losing all torrents

Post by chrishirst »

Reduce the global maximum connections to ~850 or less will 'fix' it.
Maycne Sonahoz
New User
New User
Posts: 3
Joined: Wed Aug 31, 2016 5:07 pm

Re: "Too many files open" error and losing all torrents

Post by Maycne Sonahoz »

I haven't replied since the issue has been fixed in the ticket: it was a bug with the tracker icons not being closed correctly.
http://dev.deluge-torrent.org/ticket/2889#comment:8
shamael
Compulsive Poster
Compulsive Poster
Posts: 667
Joined: Sat Oct 08, 2016 9:28 am

Re: "Too many files open" error and losing all torrents

Post by shamael »

thx for the feedback :)
Post Reply