Memory leakage

*nix specific usage questions
Gen
New Cone
New Cone
Posts: 3
Joined: 06 Dec 2005 08:49

Memory leakage

Postby Gen » 06 Dec 2005 09:02

Good day!
I have such problem - I'm streaming DVB to network, nothing special, but after some time VLC begin to use more and more memory on my box, until I (or kernel) kill it.
I try vlc 0.8.2 and 0.8.4-test2. To start vlc I use:
vlc --intf telnet --daemon --ts-es-id-pid --programs 1,2,3,5 dvb: --dvb-adapter=0 --dvb-frequency=11044000 --dvb-srate=29800000 --dvb-voltage=13 --sout '#duplicate{dst={standard{access=http,mux=ogg,url=0.0.0.0:8080}},select="program=1",dst={standard{access=http,mux=ogg,url=0.0.0.0:8081}},select="program=2",dst={standard{access=http,mux=ogg,url=0.0.0.0:8082}},select="program=3",dst={standard{access=http,mux=ogg,url=0.0.0.0:8083,slp,name=MuzTV}},select="es=47,es=48",dst={transcode{acodec=mpga,ab=128}:standard{access=http,mux=ogg,url=0.0.0.0:8084,slp,name=LoveRadio}},select="es=65"}'
Any suggestions are welcome :)

anohman
New Cone
New Cone
Posts: 3
Joined: 12 Dec 2005 14:34
Location: Finland

I'm having the same problem

Postby anohman » 12 Dec 2005 15:01

I'm having the same problem while streaming some DVB channels.

My machine has 386Mb of RAM and 750Mb of swap. I can usually stream channels from one DVB-T card for several weeks. If stream from 2 cards at the same time (with 2 instances of VLC of course) I run out of memory after only 3 or 4 days. I'm not actually transcoding any of the channels, I just stream the MPEG2 with audio and subtitles in separate TS for each channel.

Does your system work better than this? How long does it take for VLC to eat up all the memory on your PC?

Gen
New Cone
New Cone
Posts: 3
Joined: 06 Dec 2005 08:49

Postby Gen » 13 Dec 2005 09:43

I thing it works worse..
I have 512Mb RAM and 512Mb of swap, stream 4 TV channels and 1 Radio (transcoding it to 128Kbit) from one DVB-S card, system is RH 9.0 with 2.6.14 kernel (I thought there was problem in kernel or old drivers). For streaming I use http access, may be, this is the cause, but i can't use another method. VLC eats up all memory in 5-6 hours, maxumum in a day. It's not a problem that VLC is killed, but proccess of eating memmory slow down whole system and before VLC is killed, other processes sometimes is killed.
Now I have just only two things:
1) update glibc and other libraries
2) write a simple script to monitor memory activity of VLC and just rerun it if memory consumption excess some threshold.
Any suggestion?

anohman
New Cone
New Cone
Posts: 3
Joined: 12 Dec 2005 14:34
Location: Finland

My

Postby anohman » 13 Dec 2005 12:34

I'm currently writing a small watchdog application that will monitor vlc and restart it if needed. This is not really a solution at all just a stupid workaround that is far from optimal, and there is also the risk that the watchdog program will fail due to vlc eating up all available memory. And it will not fix the system slowdown either.

I'm just hoping that this bug will be resolved soon. According to https://trac.videolan.org/vlc/ticket/156 the bug is scheduled for 0.8.5-test1.

Gen
New Cone
New Cone
Posts: 3
Joined: 06 Dec 2005 08:49

Postby Gen » 14 Dec 2005 09:39

that's my ugly script.. :) if VLC use more memory than 300Mb then it will be killed. After each kill script make 'last_kill' file to know the time of kill.

#!/bin/bash

SLEEP_TIME=30;
while ((1)); do
#command to start vlc : vlc --daemon ....
start_vlc

PID=`ps -C vlc | awk ' ! /PID/ { print $1 ; exit} '` ;
if [ "$PIDx" == "x" ] ; then exit; fi;
MEM=0;
while [ $MEM -le 300000 ]; do
MEM=`cat /proc/$PID/status | awk ' /VmSize/ { print $2 }' ` ;
if [ "$MEMx" == "x" ] ; then exit; fi;
sleep $SLEEP_TIME;
done;
kill $PID;
touch last_kill
sleep 3;
done;


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 56 guests