Author Topic: iCamSource memory leak?  (Read 7322 times)

shadowen

  • Newbie
  • *
  • Posts: 6
    • View Profile
iCamSource memory leak?
« on: March 13, 2013, 02:46:18 PM »
I am running iCamSource 2.5 on Windows 7 with 4 wireless cameras connected.  I am using three Foscam FI8918W cameras and one Airlink 101 SkyIPCam1500W.  Everything works great for about a day or two and then I start losing cameras under iCam.  Upon logging into the server I find that the iCamSource software is using over 500MB of memory.  When it is running well it uses between 30-50MB.  The program becomes unresponsive and I have to kill the process using Task Manager to restart it.  It will then repeat the process after about a day.  I have disabled motion detection on all four cameras and I have adjusted the image quality to about as low as I can to make the image still viewable.  Is there a memory leak with iCamSource 2.5?  I really like the software but the stability has me concerned.

OUAnthony

  • Hero Member
  • *****
  • Posts: 801
    • View Profile
Re: iCamSource memory leak?
« Reply #1 on: March 13, 2013, 04:32:29 PM »
I have also noticed this, and it is annoying. From what I can tell on my system (4 IP cameras...one of which is a Foscam knockoff), it primarily happens when a large percentage of my RAM is being used by other programs...such as when I have IE and Firefox open, and I'm converting videos or possibly recording video in Media Center at the same time. Other programs don't freak out under the same conditions, so I'm also thinking memory leak.

Stefan

  • Administrator
  • Hero Member
  • *****
  • Posts: 2358
    • View Profile
Re: iCamSource memory leak?
« Reply #2 on: March 13, 2013, 05:17:42 PM »
What is the CPU usage of the iCamSource running with your 4 IP cameras? What are the frame rates for the cameras you are using? It could be that, if the frame rates are too high, that when the computer starts to get busy with other tasks that the data stream from the camera simply builds up in the iCamSource, causing a chain reaction that leads to it tripping over itself.

You set the AirLink's frame rate through the camera's web interface, and for the Foscams you just need to add a "rate" parameter to the URL: http://skjm.com/forum/index.php?topic=3500.msg12167#msg12167

Or it could be that one or more of the cameras sometimes sends the iCamSource corrupt or invalid data that causes the iCamSource to get confused and results in a leak.

A lot of the Mac and Windows back-end code is common ... I believe pretty much all of the IP camera code is. I run the latest Mac version of the iCamSource with 3 or 4 IP cameras (also a combination of AirLinks and Foscams) on an old Mac mini and it runs for weeks without issues. (Dropbox is usually the thing that's eating up all the memory.) :p

OUAnthony

  • Hero Member
  • *****
  • Posts: 801
    • View Profile
Re: iCamSource memory leak?
« Reply #3 on: March 13, 2013, 05:48:56 PM »
For my system:

3 DCS-910's set at 5fps each
1 LOFTEK CXS-2200 (Foscam knockoff) with no fps parameter added to the URL

Average CPU usage was 25-35% and RAM usage around 30-50MB.

Dropbox has low CPU usage (<5%), and uses around 25MB of RAM.

My total physical memory being used is often more than 75% (of 4GB) if I'm recording or converting video and have multiple tabs in IE & Firefox open.

I added the FPS parameter to the LOFTEK URL to see if it makes a difference in stability.

Stefan

  • Administrator
  • Hero Member
  • *****
  • Posts: 2358
    • View Profile
Re: iCamSource memory leak?
« Reply #4 on: March 13, 2013, 08:46:20 PM »
OUAnthony, do you have this issue on a daily basis? Or is there any other pattern to what causes the issue that you can see?

OUAnthony

  • Hero Member
  • *****
  • Posts: 801
    • View Profile
Re: iCamSource memory leak?
« Reply #5 on: March 14, 2013, 07:12:47 AM »
Nope, it's not daily...generally happens when I'm doing video recording or converting...when I'm using nearly all of my RAM (and possibly all/most of my CPU). I think it probably has to do with the computer getting too busy with other tasks and the data stream builds up in icamsource, like you said. Is there a way to give priority to icamsource so that a certain CPU % and certain # of MB of RAM are reserved for it?

shadowen

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: iCamSource memory leak?
« Reply #6 on: March 15, 2013, 10:14:43 AM »
What is the CPU usage of the iCamSource running with your 4 IP cameras? What are the frame rates for the cameras you are using?

The CPU usually bounces around 30%.  I have not made any adjustments to the frame rates, so I believe they have defaulted to 30fps.  I'll try reducing it and see if the helps.

Merlin

  • Full Member
  • ***
  • Posts: 115
    • View Profile
Re: iCamSource memory leak?
« Reply #7 on: March 16, 2013, 11:18:23 AM »
For my system: copying your format ouanthony

3 Cisco Linksys-N WVC80N
1 AIRLINK101 AICN777W

Average CPU usage was 35-60% and RAM usage around 37-55MB.

Dropbox has low CPU usage (<5%), and uses around 40MB of RAM.

My total physical memory being used is often more than 52% (of 4GB).

Hope that helps...
Merlin

OUAnthony

  • Hero Member
  • *****
  • Posts: 801
    • View Profile
Re: iCamSource memory leak?
« Reply #8 on: March 16, 2013, 12:00:01 PM »
Merlin, are you experiencing the same issue as me and shadowen?

Shadowen, have you noticed if you're only losing cameras when your CPU or RAM usage is really high?

Merlin

  • Full Member
  • ***
  • Posts: 115
    • View Profile
Re: iCamSource memory leak?
« Reply #9 on: March 16, 2013, 11:47:56 PM »
Dropped cameras and dropped frames the higher the CPU.  I also have the frame rate at 3 fps right now.  I see the action on the computer but what records is less.  Again both issues when CPU usage is at it's highest.

Merlin

Stefan

  • Administrator
  • Hero Member
  • *****
  • Posts: 2358
    • View Profile
Re: iCamSource memory leak?
« Reply #10 on: March 17, 2013, 11:10:45 AM »
Dropped cameras and dropped frames the higher the CPU.  I also have the frame rate at 3 fps right now.  I see the action on the computer but what records is less.  Again both issues when CPU usage is at it's highest.

Merlin

The "more often" motion detection setting in the iCamSource should be about half a second, so anything faster than 2 fps should be about the same in terms of motion detection recording. (In theory, anyway.)

shadowen

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: iCamSource memory leak?
« Reply #11 on: March 20, 2013, 01:23:39 PM »
I dropped the frame rate of all 4 of my cameras to 5fps and things seem a lot more stable now.  Thanks!

Merlin

  • Full Member
  • ***
  • Posts: 115
    • View Profile
Re: iCamSource memory leak?
« Reply #12 on: March 21, 2013, 06:18:23 AM »
I have to admit I was very skeptical about lowering my cameras to 2 FPS, but I tried it.  They have been going for more than 3 days and I have been very pleased with the results and the reduction in CPU usage.  RAM usage appears to be the same.  Because of all this I have added a fifth camera.   ;D  There have been numerous people caught at my front door and walking in my driveway and the frame rate or capture rate appears to be same as when I had it set at 3 FPS.

Merlin

Stefan

  • Administrator
  • Hero Member
  • *****
  • Posts: 2358
    • View Profile
Re: iCamSource memory leak?
« Reply #13 on: March 21, 2013, 09:16:15 AM »
Glad to hear that worked for you guys! :)

35remington

  • Newbie
  • *
  • Posts: 42
    • View Profile
iCamSource memory leak?
« Reply #14 on: March 26, 2013, 01:16:32 PM »
How does one adjust frame rates for a Foscam camera?