Re: Socket connection return "Process file table overflow."



Hi, thanks for the response,

For your first question, i don't know how to respond, how i see this?
i implement by examples that i find in the internet...

I think the problem is on my closing connections function too, but
where i can't seem to understand, I'm freeing the context because the
idea is to free/release/close everything that i opened... i should not
be freeing the context?




On 25 Mar, 14:41, David Schwartz <dav...@xxxxxxxxxxxxx> wrote:
On Mar 25, 4:06 am, Nuno <nuno.escul...@xxxxxxxxx> wrote:

1) I can't perform two sequential downloads with the same open
socket, the SSL_write and SSL_read functions fail in the second
download.

What version of HTTP did you implement?

2) Because of the first problem, before i download any file i perform
a reconnect action (close the connection and open again everything),
but the problem is that when i try to download several files (300 for
example), sequentially, in the 20s or 30s i have the following error
"Process file table overflow." when i try to create the socket. And
only after waiting a while (five ten minutes) is when i can download
any other file without restarting the process.

There's probably a bug in your program, perhaps you're not closing
connections properly.



I' think that my problem to both problems is cleaning process, i do
not close or is missing some cleanup operations on my socket... but i
can't seem to figure what is?!

For example to connect i perform the following actions:
//open the socket
m_nSocketFD = socket(PF_INET, SOCK_STREAM, 0); /*is here that the
"Process file table overflow." is given*/
bzero(&sAddr, sizeof(sAddr));
sAddr.sin_family = AF_INET;
sAddr.sin_port = htons(n_port);
sAddr.sin_addr.s_addr = *(long*)(psHost->h_addr);
connect(m_nSocketFD, (struct sockaddr*)&sAddr, sizeof(sAddr));
//open the ssl connection
m_psSSLctx = InitCTX();
m_psSSL = SSL_new(m_psSSLctx); /* create new SSL connection state
*/
SSL_set_connect_state(m_psSSL);
SSL_set_fd(m_psSSL, m_nSocketFD); /* attach the socket descriptor
*/
SSL_set_mode(m_psSSL,SSL_MODE_AUTO_RETRY);
SSL_connect(m_psSSL);

To close connections i perform the following actions (i think it's
here that is missing something but i don't know what?!?)
X509_free(m_pcX509Cert);
SSL_shutdown(m_psSSL);
SSL_free(m_psSSL);
SSL_CTX_free(m_psSSLctx);

close(m_nSocketFD);/* close socket */

Why are you freeing the context?

DS

.



Relevant Pages

  • Asynchronous Socket Server data
    ... The socket server knows what type of data it expects due to the interface ... I can have 1 databuffer only for each datatype to handle multiple connections? ... int bytesRead = handler.EndReceive; ... packetIndex, bytesRead); ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Ping =?ISO-8859-1?Q?kr=E1ft=E9=E9_=3F_Advice_needed_?= =?ISO-8859-1?Q?to_trace_w
    ... He has two telephone extensions leading from the master socket and his ... presume that there is a fault in his extension wiring. ... If it's twisted pair ensure that it's not been connected split pair, in other words the blue white with white blue, orange white with white orange, if you get my drift, & the connections you should use are 2&5 ...
    (uk.telecom.broadband)
  • Re: !EventConnect Problem
    ... the June roll-up is available somewhere, although there's not been the usual ... The socket is not in a listening state. ... The incoming connection queue has no room for connections. ...
    (microsoft.public.windowsce.app.development)
  • Re: !EventConnect Problem
    ... the June roll-up is available somewhere, ... The socket is not in a listening state. ... The incoming connection queue has no room for connections. ...
    (microsoft.public.windowsce.app.development)
  • WinHttpRequest Objekt Ressourcenfreigabe
    ... ich benutze das WinHttpRequest-Objekt der WinHTTP Services V5.1 in einem VB6 Programm unter WIN XP, um asynchron bis zu ca. 60 Bilder gleichzeitig von einem Server im Internet zu laden. ... Die Bilder kommen nach dem Download in einen Cache ... Es werden erstmal 60 Connections zum Server erzeugt. ...
    (microsoft.public.de.vb)