Ardhi Putra Pratama
2016-10-10 21:55:25 UTC
Hello,
I noticed that, peer tends to disconnect because of time out in very
small period. In the documentation, it should be 15 seconds (look
"peer_connect_timeout"). However, in my case, it around 4.5 second,
somehow.
I found this out by calling "get peer info" regularly and enable
peer_disconnect alert. In the same time, libtorrent was compiled with
all statistics and logging enabled. In a particular time, an IP x is
shown in the peer_info list. In the next interval I called
get_peer_info, the IP x is disappear. I also get alert that IP x is
disconnected because of timeout. Moreover in the logging file I found
the line :
(replaced the target IP as "IP-X")
*** starting log ***
00:00:04.504: >>> OUTGOING_CONNECTION [ ep: IP-X:48507 type: uTP seed:
0 p: 0x7fe25c01f108 local: 0.0.0.0:6881]
00:00:04.504: *** bt_peer_connection
00:00:04.504: <<< REQUEST_BANDWIDTH [ download: 30 prio: 1 channels:
0x11bbc18 0x7fe25c007910 0x7fe25c041b08 (nil) limits: 0 0 0 0 ignore:
0 ]
00:00:04.504: <<< ASSIGN BANDWIDTH [ bytes: 50 ]
00:00:04.504: <<< CANNOT READ [ quota: 50 ignore: no
can-write-to-disk: yes queue-limit: 1048576 disconnecting: no ]
00:00:04.505: >>> OPEN [ protocol: IPv4 ]
00:00:04.505: >>> BIND [ ep: 0.0.0.0:0 ]
00:00:04.505: >>> ASYNC_CONNECT [ dst: IP-X:48507 ]
00:00:04.505: *** LOCAL ENDPOINT[ e: 192.168.1.128:6881 ]
00:00:05.503: *** UPDATE_QUEUE_SIZE [ dqs: 2 max: 500 dl: 0 qt: 3 snubbed: 0 ]
00:00:05.503: >>> SEND_BUFFER_WATERMARK [ 512 max: 512000 min: 512 factor: 50 ]
00:00:06.006: *** UPDATE_INTEREST [ not interesting ]
00:00:06.503: *** UPDATE_QUEUE_SIZE [ dqs: 2 max: 500 dl: 0 qt: 3 snubbed: 0 ]
00:00:06.503: >>> SEND_BUFFER_WATERMARK [ 512 max: 512000 min: 512 factor: 50 ]
00:00:07.503: *** UPDATE_QUEUE_SIZE [ dqs: 2 max: 500 dl: 0 qt: 3 snubbed: 0 ]
00:00:07.503: >>> SEND_BUFFER_WATERMARK [ 512 max: 512000 min: 512 factor: 50 ]
00:00:08.003: CONNECTION FAILED: IP-X:48507
00:00:08.003: *** CONNECTION CLOSED Connection timed out
I used libtorrent 1.0.10. Any idea what causes this?
Regards,
ardhi
I noticed that, peer tends to disconnect because of time out in very
small period. In the documentation, it should be 15 seconds (look
"peer_connect_timeout"). However, in my case, it around 4.5 second,
somehow.
I found this out by calling "get peer info" regularly and enable
peer_disconnect alert. In the same time, libtorrent was compiled with
all statistics and logging enabled. In a particular time, an IP x is
shown in the peer_info list. In the next interval I called
get_peer_info, the IP x is disappear. I also get alert that IP x is
disconnected because of timeout. Moreover in the logging file I found
the line :
(replaced the target IP as "IP-X")
*** starting log ***
00:00:04.504: >>> OUTGOING_CONNECTION [ ep: IP-X:48507 type: uTP seed:
0 p: 0x7fe25c01f108 local: 0.0.0.0:6881]
00:00:04.504: *** bt_peer_connection
00:00:04.504: <<< REQUEST_BANDWIDTH [ download: 30 prio: 1 channels:
0x11bbc18 0x7fe25c007910 0x7fe25c041b08 (nil) limits: 0 0 0 0 ignore:
0 ]
00:00:04.504: <<< ASSIGN BANDWIDTH [ bytes: 50 ]
00:00:04.504: <<< CANNOT READ [ quota: 50 ignore: no
can-write-to-disk: yes queue-limit: 1048576 disconnecting: no ]
00:00:04.505: >>> OPEN [ protocol: IPv4 ]
00:00:04.505: >>> BIND [ ep: 0.0.0.0:0 ]
00:00:04.505: >>> ASYNC_CONNECT [ dst: IP-X:48507 ]
00:00:04.505: *** LOCAL ENDPOINT[ e: 192.168.1.128:6881 ]
00:00:05.503: *** UPDATE_QUEUE_SIZE [ dqs: 2 max: 500 dl: 0 qt: 3 snubbed: 0 ]
00:00:05.503: >>> SEND_BUFFER_WATERMARK [ 512 max: 512000 min: 512 factor: 50 ]
00:00:06.006: *** UPDATE_INTEREST [ not interesting ]
00:00:06.503: *** UPDATE_QUEUE_SIZE [ dqs: 2 max: 500 dl: 0 qt: 3 snubbed: 0 ]
00:00:06.503: >>> SEND_BUFFER_WATERMARK [ 512 max: 512000 min: 512 factor: 50 ]
00:00:07.503: *** UPDATE_QUEUE_SIZE [ dqs: 2 max: 500 dl: 0 qt: 3 snubbed: 0 ]
00:00:07.503: >>> SEND_BUFFER_WATERMARK [ 512 max: 512000 min: 512 factor: 50 ]
00:00:08.003: CONNECTION FAILED: IP-X:48507
00:00:08.003: *** CONNECTION CLOSED Connection timed out
I used libtorrent 1.0.10. Any idea what causes this?
Regards,
ardhi