Networking Forums

Networking Forums > Computer Networking > Linux Networking > A strange problem(about socket tcp connection)~~~

Reply
Thread Tools Display Modes

A strange problem(about socket tcp connection)~~~

 
 
Harry
Guest
Posts: n/a

 
      06-22-2007, 03:04 PM
Hi, everyone

I have a problem when developing a server.
It really troubles me for a very long time.

The server's socket-connection is working undering Asynchronize-mode(linger
time is 30 seconds).

One accept-thread accept new request socket, and then pass the file-handle
to other work threads(several ones).

When the Server is working under heavy pressure, for example > 30
requests/second,
it will only work for several hours.
And after that the new TCP connections can't be connected anymore.

At server side, the status is SYN_RECV(and then be closed as TIMEOUT); at
the client side, the status is ESTABLISHED.

Function accept() can't create any new socket anymore!!!

~~~More strange is, each time when I use "gdb" attach the working process,
and quit debug at once(nothing else be done before quit),
the Server's status will be unlocked, it gets back into normally working
status!!!


WHAT'S THE TROUBLE?

PLS give me any help

THANKS

Harry
06/22/2007


 
Reply With Quote
 
 
 
 
Harry
Guest
Posts: n/a

 
      06-24-2007, 10:06 AM


"Harry" <(E-Mail Removed)> дÈëÏûÏ¢ÐÂÎÅ:f5god6$qe4$(E-Mail Removed)...
> Hi, everyone
>
> I have a problem when developing a server.
> It really troubles me for a very long time.
>
> The server's socket-connection is working undering
> Asynchronize-mode(linger time is 30 seconds).
>
> One accept-thread accept new request socket, and then pass the file-handle
> to other work threads(several ones).
>
> When the Server is working under heavy pressure, for example > 30
> requests/second,
> it will only work for several hours.
> And after that the new TCP connections can't be connected anymore.
>
> At server side, the status is SYN_RECV(and then be closed as TIMEOUT); at
> the client side, the status is ESTABLISHED.
>
> Function accept() can't create any new socket anymore!!!
>
> ~~~More strange is, each time when I use "gdb" attach the working process,
> and quit debug at once(nothing else be done before quit),
> the Server's status will be unlocked, it gets back into normally working
> status!!!
>
>
> WHAT'S THE TROUBLE?
>
> PLS give me any help
>
> THANKS
>
> Harry
> 06/22/2007
>
>



 
Reply With Quote
 
Robert Harris
Guest
Posts: n/a

 
      06-24-2007, 06:43 PM
Harry wrote:
>
>
> "Harry" <(E-Mail Removed)> дÈëÏûÏ¢ÐÂÎÅ:f5god6$qe4$(E-Mail Removed)...
>> Hi, everyone
>>
>> I have a problem when developing a server.
>> It really troubles me for a very long time.
>>
>> The server's socket-connection is working undering
>> Asynchronize-mode(linger time is 30 seconds).
>>
>> One accept-thread accept new request socket, and then pass the file-handle
>> to other work threads(several ones).
>>
>> When the Server is working under heavy pressure, for example > 30
>> requests/second,
>> it will only work for several hours.
>> And after that the new TCP connections can't be connected anymore.
>>
>> At server side, the status is SYN_RECV(and then be closed as TIMEOUT); at
>> the client side, the status is ESTABLISHED.
>>
>> Function accept() can't create any new socket anymore!!!
>>
>> ~~~More strange is, each time when I use "gdb" attach the working process,
>> and quit debug at once(nothing else be done before quit),
>> the Server's status will be unlocked, it gets back into normally working
>> status!!!
>>
>>
>> WHAT'S THE TROUBLE?
>>
>> PLS give me any help
>>
>> THANKS
>>
>> Harry
>> 06/22/2007
>>


You have a programming bug somewhere, e.g. you write where you have not
malloc'd.

Robert
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Very STRANGE LAN connection problem matt Windows Networking 0 05-26-2006 01:45 AM
Strange connection problem :-/ Steve Derby Broadband 10 07-20-2005 02:08 AM
Really strange TS connection problem cmalmstrom Windows Networking 3 06-21-2004 06:57 PM
Troubled with a socket connection problem... please help Mark Kromski Linux Networking 13 05-11-2004 11:44 AM
strange connection problem peter Windows Networking 0 10-16-2003 03:06 PM



1 2 3 4 5 6 7 8 9 10 11