Motion - Bug Report 2005x 10x 22x 113641

BUG: Possible memory leak in Motion

Hi Kenneth,

I have a memory problem with Motion (both versions motion-3.2.1 motion-3.2.3)

When I start it it uses about 8k of memory but after 10 hours of running it’s using 450mb of memory

When I after the 10 hours kill the motion deamon it’s releasing all the 450mb of memory

What could be the problem here?

I’m using RedHat Enterprise version 4 with all the latest patches

I tried also different versions of ffmpeg and others, but without any result. currenly I’m using;

-rw-r--r--  1 root root   79215 okt 21 18:06 faac-1.24-1.2.el4.rf.i386.rpm
-rw-r--r--  1 root root  455744 okt 21 18:06 faad2-2.0-4.2.el4.rf.i386.rpm
-rw-r--r--  1 root root 2384928 okt 21 18:03 ffmpeg-0.4.9-0.20041110.3.2.el4.rf.i386.rpm
-rw-r--r--  1 root root  638075 okt 21 18:05 imlib2-1.2.0-1.2.el4.rf.i386.rpm
-rw-r--r--  1 root root   58260 okt 21 18:04 libpostproc-1.0-0.17.pre7.2.el4.rf.i386.rpm
-rw-r--r--  1 root root  199766 okt 21 17:56 motion-3.2.3-2.i386.rpm
-rw-r--r--  1 root root  265511 okt 21 18:04 xvidcore-1.0.3-1.2.el4.rf.i386.rpm

> >>added by Sander: the motion.conf file is uploaded and the camera i use is a Philips 750 usb webcam
> >>using the pwc-10.0.7a driver, the video device is /dev/video0

Submitted on behalf of Sander by KennethLavrsen

Test case

Environment

Motion version: 3.2.3
ffmpeg version: ffmpeg-0.4.9-0.20041110.3.2.el4.rf.i386.rpm
Shared libraries: ffmpeg, mysql, postgresql
Server OS: RH Ent. 4

-- KennethLavrsen - 22 Oct 2005

Follow up

Sander. Please post your complete motion.conf and any thread files. Also give into on which cameras and which drivers you use with Motion.

Remember to remove any secret passwords from the config files.

You can attach your config files to this topic. Very simple. Either register or use TWikiGuest (Password = guest)

-- KennethLavrsen - 22 Oct 2005

Your motion.conf is absolutely horrorble. Where did you get that from?

> >> added by Sander: http://www.mayin.org/aragorn/computers/webcam.html ,see setup item 7 there is a motion.conf file

Please clean the mess by either

  • Open the remote control port in any browser and save your config file. Motion will clean out making a fresh file with all the options with the correct defaults.
  • Throw the one you have out and start with a fresh motion-dist.conf.

You minimum_gap value is crazy. Should be zero.

Your gap value is crazy. Should be something like 30 or 60. Or 0 to disable (not recommended).

threshold 99999 is not the way to turn off motion detection. To not motion detect turn off output_normal and ffmpeg_cap_new.

minimum_motion_frames 1000 = your "memory leak".

This means that Motion will buffer 1000 pictures in memory. Read here ConfigOptionMinimumMotionFrames.

-- KennethLavrsen - 22 Oct 2005

Fix record

Not a bug. The issue is a way to high minimum_motion_frames value causing 1000 x 320 x 240 x 1.5 = 115.2 MB being reserved for buffering images. This memory is used after 1000 seconds (cpu_low). Add to this some other large values of other features that prevents events from ending etc - it is no wonder that Motion ends up choking.

-- KennethLavrsen - 22 Oct 2005
Topic revision: r4 - 22 Oct 2005, TWikiGuest
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.