Page 1 of 1

Terrible "Buffer Overrun" problem - stop recording

Posted: Tue Jan 10, 2006 10:23 am
by victor_diago
Hi all.

I have a server running ZM 1.20.1 with 1 GB memory, 20 cameras at less than 3 fps being :

17 Cameras in Record mode
3 Cameras at Modect mode.

The Modect Camera works very well but im having headaches on the record cameras.


I have 327 MB shared memory, and im running all cameras at less than 3 fps (it is 5 shared chip bt878 cards with 4 input each one), ImageBufferCount set to 60, WrmUPFrame set to 5 Pre and Post Event set to 3 each one and AlarmFrameCount set to 3. Also its capturing at 320x240.

By doing the calc 320 * 240 * 3 * 20 * 60 i see that i would need to share 276MB of memory and im sharing a lot more.

But the problem is that after some given time, say 1 hour or less, the record cameras stops to record and i can see in syslog the message "Buffer overrun at index XX". I think a number of 60 in ImageBuffer is very good for less than 3 fps and im also sharing a lot more memory than it would be needed so why i could be getting this problem ?

i set SectionLength set to 300 and FrameSkip to 0..

The computer is a Pentium 4 LGA 3.4Ghz with 1 Gb of ram.

ive used Zoneminder 1.17.x with 16 cameras with no problem, does this version have any known bug ? to remember im using 1.20.1.

Please somebody could help me ?

Phil, what does that message means ?????

Thanks for all

Victor Diago

Posted: Tue Jan 10, 2006 12:16 pm
by jameswilson
i had this but im not sure how i fixed it. I think i dropped the pre and post alarm bufferc ount to 1, dont use 0 as this causes other problems

Posted: Tue Jan 10, 2006 2:48 pm
by victor_diago
Im having problems with the RECORD cameras only.

should PRe and Post buffer count make any difference in this kind of monitoir ? i was convinced that it only affect the Modect Ones.


Im in troubles with this problem....


Thanks for now.

Victor Diago

Posted: Tue Jan 10, 2006 3:29 pm
by jameswilson
i think the buffers are still used but ignored as far as events go. The reason i say this is when in movord mode yu will see slight overleap from the end of 1 event to the beginning of the next. But that is mocord not record

Posted: Wed Jan 11, 2006 11:16 am
by victor_diago
Ok, but this even doesnt make sense. Phil, do you have any clue about that ? Thanks
Victor Diago

Posted: Wed Jan 11, 2006 12:02 pm
by jameswilson
buffers.
I think that if you set the pre alarm to 10 then 10 frames will still be cached in ram, but obviously it will never go into alarm as there will never be a trigger. So its still storing 10 images in ram. Have you tried dropping this to 1?

James

Posted: Wed Jan 11, 2006 12:42 pm
by victor_diago
Yes, ive tried.

But again same problem. but ive updated zm to 1.21.4 and it seems to have solved... same settings than before and still now no errors.


But this time what failed was the frame server that returned some errors like Didnt write all the event...

I will still search for now.

Thanks James

Victor Diago

Posted: Wed Jan 11, 2006 2:05 pm
by zoneminder
Sorry I'm late on this thread (server rebuild due to disk failure).

To answer the earlier question, the buffer overrun error occurs when the capture daemon writes to a slot in the ring buffer before the analysis daemon has even read from it. So if your buffer is 60 slots then it means that the capturing is running 60 frames ahead of analysis. This is a lot and should not normally occur. The normal causes of this would be that your image buffer size is too small and normal variations can cause it to temporaily drop behind enough (not likely in your cause I suspect) or that something has caused the analysis daemon to slow down or stop, either for one process or the system has slowed as a whole. It's very difficult to say for sure historically but things to look for are database or filesystem problems that might cause temporay lock ups when writing frames etc. The pre and pot ever buffers are not true buffers but just counts and shouldn't make any difference (though the pre-one needs to be less than the image buffer size). As James mentioned, when in Record or Mocord mode these just form small overlaps between events.

The frame server issue is possible because the analysis daemon is sending images bigger than the socket buffer size to the frame server. If this is the case you need to increase your system socket size. Or just turn off the frame server for simplicity.