After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 358061 - Manual setting of number of connections ignored
Manual setting of number of connections ignored
Status: RESOLVED FIXED
Product: Pan
Classification: Other
Component: general
pre-1.0 betas
Other All
: Normal normal
: ---
Assigned To: Charles Kerr
Pan QA Team
Depends on:
Blocks:
 
 
Reported: 2006-09-28 01:00 UTC by bloch
Modified: 2006-11-02 17:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
0.115 patch (1.06 KB, patch)
2006-10-02 17:13 UTC, Charles Kerr
committed Details | Review
cvs head patch (2.62 KB, patch)
2006-10-31 04:28 UTC, Charles Kerr
none Details | Review

Description bloch 2006-09-28 01:00:30 UTC
Please describe the problem:
I tried to get around the limit of 4 news server connections in the GUI by editing this parameter in config.xml.  I increased it to 8 for a particular server that doesn't have a limit.  However, Pan still only makes 4 connections to that server.

Steps to reproduce:
1. Edit number of connections in config.xml
2. Restart Pan
3. 


Actual results:
Pan still uses 4 connections

Expected results:
Pan should use the number of connections set in config.xml

Does this happen every time?
Yes

Other information:
Comment 1 Charles Kerr 2006-10-02 17:13:35 UTC
I can't reproduce this.  I have Pan scaling up to whatever
is specified in connection-limit in servers.xml.

However, Pan does seem to be adding new connections more
slowly than it should.  If you have a fast news server,
you need a really big multipart before it reaches steady
state with N connections.  Otherwise, the queue's connection
recycling is maybe too efficient. ;)

Attached is a patch that makes Pan try to make more connections
right off the bat -- as many as the download task wants and
connection-limit allows.

Give the patch a spin and see if the problem persists.
I realize I'm not addressing the problem you asked about,
but I suspect what you're seeing is a symptom of what the
patch tries to fix.
Comment 2 Charles Kerr 2006-10-02 17:13:56 UTC
Created attachment 73868 [details] [review]
0.115 patch
Comment 3 Charles Kerr 2006-10-05 20:50:21 UTC
Ping
Comment 4 Duncan 2006-10-11 11:46:04 UTC
Since the reporter appears to be MIA...  I can confirm that I had noticed the slow connection activation here (my pay server allows 8 connections, which I had set manually).  I didn't realize it was something pan could do something about, however, and it eventually got there, so I just took it in stride.

I've not tried the patch or 0.116 yet -- I'm going thru the bugs fixed list ATM, but given your comments, am relatively sure this will fix the slow activation I saw. =8^)

Thanks!
Duncan
Comment 5 bloch 2006-10-14 15:13:15 UTC
I've been out of the country for a while - I'll check out 0.116 and see whether this has been fixed.
Comment 6 bloch 2006-10-15 20:43:17 UTC
I've been running today's CVS and I still don't seem to be getting the full allocation of 8 connections to this particular server.
Comment 7 Duncan 2006-10-15 23:52:31 UTC
Verified with yesterday's CVS (or early this AM's, same diff AFAIK since it appeared the last bug closed was Friday).

A bit of "watch -n1 -d netstat -to" (that's one-second updates, with diffs hilighted, on the netstat command watching TCP sockets with timeouts) seemed to reveal what was up.

Part of it apparently isn't pan's fault, but pan could help.  What's happening is that pan is sticking with one connection in the SYN/timeout state for several minutes, repeating several syn cycles, before it gets a fully opened connection.  The server end seems to be slow in the response, for whatever reason (the connection once established isn't all that bad, a few resets but nothing like the many bad/dropped packets I one might expect if that's the issue).

Once one connection gets established, the second does the same thing, but for what seems a shorter time.  The third again but shorter time, and after the third, it's as if the gates open, and the rest of the connections are established almost immediately.

Now, the wait for ACK and fully open connection pan can't do anything about.  However, it tries only one at a time for the first 2 or 3 connections, then it seems to say hey, this server's working, and goes for it!  If pan could try opening several connections at once, hopefully one of them would get thru sooner, and even if not, when the server end /did/ ACK and fully open the connection, there'd be less wait for the others.

I'll be honest.  I thought pan had choked on the connection to that server or something (that it was rejecting the connection entirely), and tried closing and opening pan 3-4 times, before trying a watched netstat command.  I even opened up the web browser and went and double-checked status altho I prepaid several months and it's not due until February, just to be sure.  I can't explain why the server end was so slow, but if pan could try either all configured eight or at least four connections at a time (I'd personally go for that, so as not to hammer them with syn packets even if they do allow 8 connections), or even two, it would seriously speedup the startup.

BTW, the pay server here is NewsHosting.com, the unlimited bandwidth account and server.  Again, eight allowed connections (and yes I get all eight after it gets going).  Straight user/pass login from pan but it's not waiting on validation, it's waiting to open the connection, while validation only happens once it's open, AFAIK.  Maybe the auth server is overloaded and they are putting a hold on accepting connections until it has room in its quota, causing SYN timeouts?  Anway, no weird SSL tunneling or the like adding complexity here.  Since the reporter mentions eight connections and the same problem as well, I'm wondering if he happens to have an account with them too.  (I've loved them so far, save for this, and I only now figured out this is mainly their end.)

If you hate to go four, even two-at-a-time should speed things up considerably.

Duncan
Comment 8 bloch 2006-10-16 08:19:42 UTC
No, I'm not using NewsHosting and it's just coincidence that I also chose 8 connections.  I just wanted more than 4 and felt more than 8 wouldn't bring any benefit.

It may be another coincidence but I'm now seeing a problem in that there are lots of 502 "number of connections exceeded" errors on the primary server i.e. not the one with 8 connections.  Pan is then going offline, and not reverting to the fallback server.  I think someone else has reported something similar.
Comment 9 Charles Kerr 2006-10-31 01:48:50 UTC
The bug in comment #8 is being addressed separately as bug #364357...
Comment 10 Charles Kerr 2006-10-31 04:28:41 UTC
Created attachment 75707 [details] [review]
cvs head patch

Allow Pan to make multiple connections concurrently
as per Duncan's suggestion in Comment #7