🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.internet.socket
4 messages
4 total messages Started by enzo Mon, 30 Oct 2006 10:34
How investigate on error 10055 (WSAENOBUFS)
#1806
Author: enzo
Date: Mon, 30 Oct 2006 10:34
22 lines
1780 bytes
How investigate on error 10055 (WSAENOBUFS)

After 1 or 2 days of working a server program, with a listen port of 
type TServerSocket, cant' no more aceess to the net.
The error returned is like the one belowe:
ERRORE=(2003) Can't connect to MySQL server on 'Localhost' (10061)
Socket error on connect. WSAGetLastError return 10055($2747)

where tha main cause is the error 10055 (WSAENOBUFS).
After this error the server can' t access to the net (also tcp or http 
to other pc no more works ), also after I close all the programs 
involved in this process

I check the open connections and memory usage, but all seems okay, fee 
connections and many memory available.

How can I check how and why the wsa buffer are allocated and how free 
them.
I also looking for a workaround or a way to manage the problem, so all 
suggestions should be usefull.

regards, Enzo
Re: How investigate on error 10055 (WSAENOBUFS)
#1810
Author: Remy Lebeau (TeamB)
Date: Mon, 30 Oct 2006 18:18
34 lines
2128 bytes
"enzo" <enzo.arlati@aesys.it> wrote in message
news:mn.f2b67d6acd45c2c3.47611@aesys.it...

> How investigate on error 10055 (WSAENOBUFS)

Start by reading the API documentation for it:

    WSAENOBUFS (10055)

    No buffer space available.

    An operation on a socket could not be performed because the system
lacked sufficient buffer space or because a queue was full.

Next, go to http://www.deja.com and search through the newsgroup archives
for prior discussions on this topic:

> After 1 or 2 days of working a server program, with a listen port
> of type TServerSocket, cant' no more aceess to the net.

Please be more specific.  What exactly can't you access?

> The error returned is like the one belowe:
> ERRORE=(2003) Can't connect to MySQL server on 'Localhost' (10061)
> Socket error on connect. WSAGetLastError return 10055($2747)

It is likely because you have too many active sockets, and WinSock doesn't
have the memory to handle all of them.  Do you, by chance, have a loop that
continuously tries to re-connect if a connection fails?  If so, then you are
probably not closing the socket properly in between each iteration.


Gambit
Re: How investigate on error 10055 (WSAENOBUFS)
#1818
Author: enzo
Date: Tue, 31 Oct 2006 08:03
30 lines
2257 bytes
Nel suo scritto precedente, Remy Lebeau (TeamB) ha sostenuto :

>> After 1 or 2 days of working a server program, with a listen port
>> of type TServerSocket, cant' no more aceess to the net.
>
> Please be more specific.  What exactly can't you access?

The connection from the server to another PC on the LAN using both tcp, 
ssh or http didn't works anymore.


>
>> The error returned is like the one belowe:
>> ERRORE=(2003) Can't connect to MySQL server on 'Localhost' (10061)
>> Socket error on connect. WSAGetLastError return 10055($2747)
>
> It is likely because you have too many active sockets, and WinSock doesn't
> have the memory to handle all of them.  Do you, by chance, have a loop that
> continuously tries to re-connect if a connection fails?  If so, then you are
> probably not closing the socket properly in between each iteration.

If I still have connection pending , opened or trying to opened I 
should see them using netstat or tcpview ( sysinternals ).
Instead I got very few connections, but I' m non more able to connect 
to a web server on my LAN ( oof course the server web is ok, the other 
PC on the LAN is still working well ).
To be able to use the net again I have to reboot the server and this is 
not a good solution.

regards, Enzo
Re: How investigate on error 10055 (WSAENOBUFS)
#1820
Author: Remy Lebeau (TeamB)
Date: Tue, 31 Oct 2006 17:28
15 lines
1556 bytes
"enzo" <enzo.arlati@aesys.it> wrote in message
news:mn.fa1f7d6a250bdda8.47611@aesys.it...

> If I still have connection pending , opened or trying to opened I
> should see them using netstat or tcpview ( sysinternals ).

That is not what I meant.  Let's say that you call connect() and it fails.
Are you looping the call to connect() so that you can retry again later?  If
so, are you closing the socket handle each time, or are you keeping it open
and re-using it each time?  Please show your actual code that is reporting
the error.


Gambit
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads