Pyshark library memory issue

Refresh

2 weeks ago

Views

6 time

0

I Would like some help on managing memory consumption of pyshark library. Using it creates an effect of requiring more memory as you process more pcap files. I guess that something is no dereferenced and thus stays in memory forever.

For example if you run this script with any pcap file, you will see that the memory required keeps growing.

import pyshark

while(True):
    cap = pyshark.FileCapture("test.pcap")
    for p in cap:
        pass
    del cap

This is an issue for me with different versions of python and pyshark, so I suppose that I am missing something. Could somebody help me with that?

0 answers