help-gnutls
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-gnutls] Problems with unclosed file descriptors


From: Stefan D
Subject: [Help-gnutls] Problems with unclosed file descriptors
Date: Fri, 18 Mar 2005 02:48:58 +0100
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

Hi there

I'm having some problems with an app I'm developing using gnutls 1.1.22. It works like a charm, but I'm getting some problems after the app has been running for a while. Then I get the "Too many open files" error. I've commented out everything other than the code for the ssl-socket, so it can't be any other socket/file causing it. The weird thing is that an "lsof | grep <appname>" shows a huge list with lines like:

<appname> 22554 stefan 351u sock 0,0 7419429 can't identify protocol

where "351u" goes from low values up to ~1000, and an "lsof | grep <appname> | wc -l" jumps around a bit and the settles at 2075 every time and gets stuck there only returning "Too many open files" (which is after, not 2000 connections, but a lot). I was wondering if I'm doing anything wrong when I close the sockets. I've tried lots of different stuff, but nothing has worked so far. This is what I do:
---------------
if(useSSL && sessionInited) {
        gnutls_bye(session, GNUTLS_SHUT_WR);
        close(sockfd);
        gnutls_deinit(session);
        sessionInited = false;
}
---------------

Is there anything I've forgotten? Any ideas? Really irritating problem because everything else works great, except that it stops working after a few hundred connections :)

/Stefan





reply via email to

[Prev in Thread] Current Thread [Next in Thread]