Re: socket.connect() hangs in SYN_SENT state.

2008-07-13 Thread bukzor
On Jul 13, 6:31 pm, Miles <[EMAIL PROTECTED]> wrote: > On Sun, Jul 13, 2008 at 8:35 PM, bukzor <[EMAIL PROTECTED]> wrote: > > The problem only manifests about 1 in 20 runs. Below there's code for > > a client that shows the problem 100% of the time. > > > The two URL's that I seem to be "confused"

Re: socket.connect() hangs in SYN_SENT state.

2008-07-13 Thread Miles
On Sun, Jul 13, 2008 at 10:29 PM, Miles <[EMAIL PROTECTED]> wrote: > On Sat, Jul 12, 2008 at 11:23 PM, bukzor <[EMAIL PROTECTED]> wrote: >> Anyone know a general reason this might happen? Even better, a way to >> fix it? > > Maybe your client has an unusually low socket timeout for some reason, > t

Re: socket.connect() hangs in SYN_SENT state.

2008-07-13 Thread Miles
On Sat, Jul 12, 2008 at 11:23 PM, bukzor <[EMAIL PROTECTED]> wrote: > Anyone know a general reason this might happen? Even better, a way to > fix it? Another reason that a socket can hang in the SYN_SENT state (besides trying to connect to an unreachable host without getting an ICMP destination-un

Re: socket.connect() hangs in SYN_SENT state.

2008-07-13 Thread Miles
On Sun, Jul 13, 2008 at 9:31 PM, Miles <[EMAIL PROTECTED]> wrote: > On Sun, Jul 13, 2008 at 8:35 PM, bukzor <[EMAIL PROTECTED]> wrote: >> The problem only manifests about 1 in 20 runs. Below there's code for >> a client that shows the problem 100% of the time. >> >> The two URL's that I seem to be

Re: socket.connect() hangs in SYN_SENT state.

2008-07-13 Thread Miles
On Sun, Jul 13, 2008 at 8:35 PM, bukzor <[EMAIL PROTECTED]> wrote: > The problem only manifests about 1 in 20 runs. Below there's code for > a client that shows the problem 100% of the time. > > The two URL's that I seem to be "confused" about point to the same IP. > Maybe this will make it clear:

Re: socket.connect() hangs in SYN_SENT state.

2008-07-13 Thread bukzor
On Jul 13, 1:08 pm, Miles <[EMAIL PROTECTED]> wrote: > On Sun, Jul 13, 2008 at 2:32 PM, bukzor <[EMAIL PROTECTED]> wrote: > > On Jul 13, 1:14 am, Miles <[EMAIL PROTECTED]> wrote: > >> On Sat, Jul 12, 2008 at 11:23 PM, bukzor <[EMAIL PROTECTED]> wrote: > >> > I'm connecting to an apache2 process on

Re: socket.connect() hangs in SYN_SENT state.

2008-07-13 Thread Miles
On Sun, Jul 13, 2008 at 2:32 PM, bukzor <[EMAIL PROTECTED]> wrote: > On Jul 13, 1:14 am, Miles <[EMAIL PROTECTED]> wrote: >> On Sat, Jul 12, 2008 at 11:23 PM, bukzor <[EMAIL PROTECTED]> wrote: >> > I'm connecting to an apache2 process on the same machine, >> > for testing. When looking at netstat,

Re: socket.connect() hangs in SYN_SENT state.

2008-07-13 Thread bukzor
On Jul 13, 1:14 am, Miles <[EMAIL PROTECTED]> wrote: > On Sat, Jul 12, 2008 at 11:23 PM, bukzor <[EMAIL PROTECTED]> wrote: > > I'm connecting to an apache2 process on the same machine, > > for testing. When looking at netstat, the socket is in the SYN_SENT > > state, like this: > > > $netstat -a -t

Re: socket.connect() hangs in SYN_SENT state.

2008-07-13 Thread Miles
On Sat, Jul 12, 2008 at 11:23 PM, bukzor <[EMAIL PROTECTED]> wrote: > I'm connecting to an apache2 process on the same machine, > for testing. When looking at netstat, the socket is in the SYN_SENT > state, like this: > > $netstat -a -tcp > tcp0 0 *:www *:* LISTEN

socket.connect() hangs in SYN_SENT state.

2008-07-12 Thread bukzor
I'm having an issue where my program hangs while doing socket.connect() for a couple minutes, then times out the connection and crashes. I'm connecting to an apache2 process on the same machine, for testing. When looking at netstat, the socket is in the SYN_SENT state, like this: $netstat -a -tcp