LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   libgtop2 error: "Too many open files" (https://www.linuxquestions.org/questions/linux-software-2/libgtop2-error-too-many-open-files-835708/)

zachlac 10-01-2010 05:02 PM

libgtop2 error: "Too many open files"
 
I have a while(1) loop, and the error is:
glibtop: open (/proc/stat): Too many open files

This error occurs after about a half hour to an hour of running.

I've tried running this multiple times, both with using glib_close() at the end of the loop, using glib_init() and glib_close() at beginning/end, and just using glib_init(). The strange thing is these have no effect on the actual glib_get functions.

Anybody familiar with libgtop and have a solution?

kbp 10-01-2010 05:09 PM

Maybe your process is just reaching its limit, 'cat /proc/<pid>/limits | grep files'. The default is 1024 which can be a little low, I usually add
Code:

* - nofile 8192
to /etc/security/limits.conf.

What I'm trying to say is it may not be a file handle leak..

cheers

zachlac 10-02-2010 08:21 PM

I tried this, and it did not work. The program still dies. I'll attach more information later.


All times are GMT -5. The time now is 02:49 AM.