Sorry, should have looked further. This patch seems to fix it.
Thanks
Martins
diff --git a/src/libpcp_import/src/archive.c b/src/libpcp_import/src/archive.c
index 4c1a0e3..8f389ff 100644
--- a/src/libpcp_import/src/archive.c
+++ b/src/libpcp_import/src/archive.c
@@ -139,6 +139,8 @@ _pmi_end(pmi_context *current)
*/
__pmLogPutIndex(¤t->logctl, &stamp);
+ __pmLogClose(¤t->logctl);
+
current->state = CONTEXT_END;
return 0;
}
On August 19, 2016 at 8:51:34 AM, Martins Innus (minnus@xxxxxxxxxxx) wrote:
Hi,
Hopefully this is an easy thing Iâm missing. Iâm using the python Log Import
api in a loop.
Basically:
log = pmi.pmiLogImport( incrementing_file_name )
âdo all the stuffâ
log.pmiWrite(seconds, useconds)
del log
Over and over again. After a while, I hit an open file descriptor limit. And using lsof,
shows all the files I had ever opened, still being open. I tried a log.pmiEnd()
in addition
to the âdel logâ with no success.
Looking through the code, it seems I need to get __pmLogClose called somehow, but I canât
seem to figure out how to do it from python.
Thanks for any suggestions on how to make this work.
Thanks
Martins
_______________________________________________
pcp mailing list
pcp@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/pcp