Hi everyone.
I'm developing a video storage and streaming server for ip cameras based on gstreamer and python. It's multithreaded daemon which launches 2 threads for each cam ( recorder and streamer). Recently I found out that upon EOS or error gstreamer pipepeline leaves some orphaned opened sockets in the system. This is very painfull because I have to run 30-50 cams per server 24/7. I already raised all limits to maximum on my linux setup, but other libraries like asyncore are failing when opened file count > 1024.I tried changing my pipeline to the most simple one, but the problem persist. Maybe I fail to release the pipeline correctly? Here's the sample code I blame the kill() function: def kill(self): if self.pipeline: self.sink.emit('clear') self.bus.remove_signal_watch() self.pipeline.set_state(Gst.State.NULL) state = self.pipeline.get_state(timeout=1*Gst.SECOND) while state[1] != Gst.State.NULL: self.remove_all() state = self.pipeline.get_state(timeout=1*Gst.SECOND) if self.ping_test(self.host) == 0: self.state = -2 else: self.state = -1 self.timestamp = None self.mainloop.quit() elif self.mainloop.is_running(): self.mainloop.quit() _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hi,
Le vendredi 30 septembre 2016 à 16:19 +0300, Krutskikh Ivan a écrit : > Hi everyone. > > I'm developing a video storage and streaming server for ip cameras > based on gstreamer and python. It's multithreaded daemon which > launches 2 threads for each cam ( recorder and streamer). Recently I > found out that upon EOS or error gstreamer pipepeline leaves some > orphaned opened sockets in the system. This is very painfull because > I have to run 30-50 cams per server 24/7. I already raised all limits > to maximum on my linux setup, but other libraries like asyncore are > failing when opened file count > 1024.I tried changing my pipeline to > the most simple one, but the problem persist. Maybe I fail to release > the pipeline correctly? Here's the sample code This could be a bug. I have followed you link, but this is just some part of code. Ideally, just file a bug with a working example that would let us reproduce. https://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer regards, Nicolas p.s. Note that setting NULL state is immediate, no need to poll/wait. _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
So my killing routine is correct? That's a shame, i really hoped that I've screwed up somewhere. 2016-09-30 16:45 GMT+03:00 Nicolas Dufresne <[hidden email]>: Hi, _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |