[Solved]Socket failure from large cache?

Suggestions and discussion of future versions
Post Reply
User avatar
starkreiten
New User
New User
Posts: 5
Joined: Tue Oct 04, 2011 2:33 am

[Solved]Socket failure from large cache?

Post by starkreiten »

Deluge 1.3.3, libtorrent 0.15.7, Win 7-64 home, AMD hex core, NAT router to cable modem w/ fixed port mapping set for deluged (uPnP had the same issues).

So, I noticed that Deluged was losing 'active' seeding connectivity after a few hours with the cache size and expiry bumped up. It appeared that once cache hit about 80000 the Port test would fail and connections would drop to just a few. Set cache_size to 0, and no problems after 37 hours.

This seems like it could be a libtorrent issue and I just grabbed 0.15.8 to try out. I'll post if it helps or I get things narrowed down a bit more.

I'm only seeding 4 torrents with nothing downloading on my solid folding box that has plenty of ram to cache them all, which is why I was trying to run cache_size 300000 and cache_expiry 600000. Yes, it will seem a bit ridiculous to most, but it still shouldn't break the silly thing. :(

Anyways, here's a few bits of the debug logs where the failures start. Nothing has been config'd oddly except for the cache settings.

Code: Select all

[INFO    ] 23:08:36 daemon:129 Deluge daemon 1.3.3
[DEBUG   ] 23:08:36 daemon:130 options: {'profile': False, 'loglevel': 'debug', 'quiet': False, 'ui_interface': None, 'interface': None, 'logfile': 'C:\\Users\\dana\\AppData\\Roaming\\deluge.log', 'config': None, 'port': None, 'pidfile': None, 'donot': True}
[DEBUG   ] 23:08:36 daemon:131 args: []
[DEBUG   ] 23:08:36 core:76 Core init..
[INFO    ] 23:08:36 core:80 Starting libtorrent 0.15.7.0 session..

[INFO    ] 23:18:12 rpcserver:203 Deluge Client connection made from: 192.168.1.101:44594
[DEBUG   ] 23:18:36 torrentmanager:678 Saving torrent state file.
[DEBUG   ] 23:18:40 config:216 Setting 'cache_size' to 300000 of <type 'int'>
[DEBUG   ] 23:18:40 preferencesmanager:504 cache_size: 300000
[DEBUG   ] 23:18:40 rpcserver:466 intevents: {5: ['NewVersionAvailableEvent', 'PluginEnabledEvent', 'SessionPausedEvent', 'TorrentAddedEvent', 'PluginDisabledEvent', 'ConfigValueChangedEvent', 'PreTorrentRemovedEvent', 'TorrentStateChangedEvent', 'TorrentFinishedEvent', 'SessionResumedEvent', 'TorrentRemovedEvent']}
[DEBUG   ] 23:18:40 rpcserver:470 Emit Event: ConfigValueChangedEvent ['cache_size', 300000]

[DEBUG   ] 03:56:42 alertmanager:123 file_error_alert: linuxmint-201109-gnome-dvd-64bit.iso file () error: Not enough space
[DEBUG   ] 03:56:42 torrentmanager:1083 on_alert_file_error: linuxmint-201109-gnome-dvd-64bit.iso file () error: Not enough space

[DEBUG   ] 04:05:31 alertmanager:123 file_error_alert: linuxmint-201109-gnome-dvd-64bit.iso file () error: Not enough space
[DEBUG   ] 04:05:31 torrentmanager:1083 on_alert_file_error: linuxmint-201109-gnome-dvd-64bit.iso file () error: Not enough space

[DEBUG   ] 04:08:39 alertmanager:123 tracker_error_alert: linuxmint-201109-gnome-dvd-32bit.iso (http://torrents.linuxmint.com/announce.php) (-1) An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full (1)
[DEBUG   ] 04:08:39 alertmanager:123 tracker_error_alert: linuxmint-201109-gnome-dvd-64bit.iso (http://torrents.linuxmint.com/announce.php) (-1) An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full (1)
[DEBUG   ] 04:08:39 alertmanager:123 tracker_error_alert: linuxmint-201109-xfce-dvd-32bit.iso (http://torrents.linuxmint.com/announce.php) (-1) An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full (1)
[DEBUG   ] 04:08:39 torrentmanager:966 on_alert_tracker_error
[DEBUG   ] 04:08:39 torrentmanager:966 on_alert_tracker_error
[DEBUG   ] 04:08:39 torrentmanager:966 on_alert_tracker_error
[DEBUG   ] 04:08:39 alertmanager:123 tracker_error_alert: linuxmint-201109-xfce-dvd-64bit.iso (http://torrents.linuxmint.com/announce.php) (-1) An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full (1)
[DEBUG   ] 04:08:39 torrentmanager:966 on_alert_tracker_error

[DEBUG   ] 04:19:02 alertmanager:123 file_error_alert: linuxmint-201109-gnome-dvd-64bit.iso file () error: Not enough space
[DEBUG   ] 04:19:02 torrentmanager:1083 on_alert_file_error: linuxmint-201109-gnome-dvd-64bit.iso file () error: Not enough space
[DEBUG   ] 04:19:02 torrent:379 set_state_based_on_ltstate: Seeding
[DEBUG   ] 04:19:02 torrent:380 session.is_paused: False

[DEBUG   ] 04:21:27 alertmanager:123 file_error_alert: linuxmint-201109-gnome-dvd-32bit.iso file () error: Not enough space
[DEBUG   ] 04:21:27 torrentmanager:1083 on_alert_file_error: linuxmint-201109-gnome-dvd-32bit.iso file () error: Not enough space
With lots more of the same errors until I reset the cache_size to 0 and restarted to a new log file.

So... just thought I'd throw a post in here, since a search didn't turn up anything that looked quite like this.

Dana
Last edited by starkreiten on Thu Oct 13, 2011 11:19 pm, edited 2 times in total.
Of course, I could be wrong....
User avatar
starkreiten
New User
New User
Posts: 5
Joined: Tue Oct 04, 2011 2:33 am

Re: socket failure from large cache?

Post by starkreiten »

Update:
libtorrent 0.15.8 didn't seem to help. 5 hours in and started getting the same errors. Did a port test through the gui and got the warning below. Total_used_buffers was up to about 93000, when I checked on it. Set cache_size 0 via console, and crashed the daemon. Fun fun....

Code: Select all

[WARNING ] 01:13:52 core:774 Error testing listen port: [Failure instance: Traceback (failure with no frames): <class 'twisted.internet.error.TimeoutError'>: User timeout caused connection failure.
]
Dana
Of course, I could be wrong....
Cas
Top Bloke
Top Bloke
Posts: 3681
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: socket failure from large cache?

Post by Cas »

Please report this to libtorrent issue tracker
thepace
Member
Member
Posts: 32
Joined: Fri Sep 02, 2011 1:02 pm

Re: socket failure from large cache?

Post by thepace »

try to learn how to setup client correctly

libtorrent will not cache in advance everything

read from its site documentation how is caching done

about your settings now

cache expiry set between 180-360 its proven and tested that it works

most users don move it from default 60 and i am pretty sure nobody tried to make noobish moves with large velues as yours is

cache size 32768 - you_choose

if your hdd and lan uplink cant give you more speed caching everything will not aid you. i can guarantee you that seeding with >60MBs is possible using one 7200rpm drive even with much lower cache values
User avatar
starkreiten
New User
New User
Posts: 5
Joined: Tue Oct 04, 2011 2:33 am

Re: socket failure from large cache?

Post by starkreiten »

Cas, thanks for the reply. I'm still not convinced that it isn't something on my end, but there are not many things left to check.

thepace, if you will direct your attention here, you might learn something. It is where i found this:
http://www.rasterbar.com/products/libtorrent/tuning.html wrote:disk cache

You typically want to set the cache size to as high as possible. The session_settings::cache_size is specified in 16 kiB blocks. Since you're seeding, the cache would be useless unless you also set session_settings::use_read_cache to true.

In order to increase the possibility of read cache hits, set the session_settings::cache_expiry to a large number. This won't degrade anything as long as the client is only seeding, and not downloading any torrents.
Update:
Even a default cache_size causes the problem if the cache_expiry is long enough for it to max out. No errors, but the connections go to 0 eventually. My ISP is suspect, but I have no idea how the cache settings could have anything to do with triggering a p2p blocker.

Dana
Of course, I could be wrong....
User avatar
starkreiten
New User
New User
Posts: 5
Joined: Tue Oct 04, 2011 2:33 am

Update: socket failure from large cache?

Post by starkreiten »

Uninstalling Nvidia Network Manager seems to have sorted my connection issues.

I vaguely recall opting to 'try it out' during my last mobo drivers update. So, my own forgotten curiosity killed the socket.

Libtorrent does seem to have some internal issues when the cache grows beyond 1GB in Windows (65536 16 KiB blocks). But I will start a new thread if I can figure out anything relevant to Deluge development on that front.

Thanks for (mostly) putting up with my ramblings! ;>

Dana
Of course, I could be wrong....
thepace
Member
Member
Posts: 32
Joined: Fri Sep 02, 2011 1:02 pm

Re: [Solved]Socket failure from large cache?

Post by thepace »

new yet unreleased version of libtorrent has many noticable improvements regarding cache handling, so you can bet most of your issues regarding cache will be solved when it gets released
Post Reply