Event View (allowed memory) Fatal Error

Support and queries relating to all previous versions of ZoneMinder
Locked
User avatar
ammaross
Posts: 61
Joined: Mon Mar 12, 2007 8:34 pm
Location: Utah, USA

Event View (allowed memory) Fatal Error

Post by ammaross »

I just stumbled upon what appears to be a long-standing bug/error in my RC2. http://www.zoneminder.com/forums/viewto ... wed+memory makes note of a similar occurance in 2004, as well as http://www.zoneminder.com/forums/viewto ... wed+memory in 2005.

I think these may not have been resolved due to not stating how to reproduce the error. On my install, I click the event total under 'hour', 'day', 'week', or 'month'. This brings up a list of events for that day, week, or whatever. When I click on the event name to view the event, the event window that pops up reports this error:

Code: Select all

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 2 bytes) in /var/www/html/zm/zm_db.php on line 98
As you can see from the rather large number, I tested this out up to 128M script size. If the system runs in DVR streaming mode, there is no problems and the page loads just fine. Viewing events from any other locations (including event filter, recent list in monitor, or the 'events' total) all seem fine.

Is anyone else able to reproduce this error, or is mine the only one that is broken?
User avatar
ammaross
Posts: 61
Joined: Mon Mar 12, 2007 8:34 pm
Location: Utah, USA

Post by ammaross »

As a bump, and an update, I just upgraded to RC3. Problem still exists.
agoodm
Posts: 52
Joined: Tue Oct 09, 2007 12:16 pm

Post by agoodm »

How many events do you have?
User avatar
ammaross
Posts: 61
Joined: Mon Mar 12, 2007 8:34 pm
Location: Utah, USA

Post by ammaross »

6 in the one I first noticed it on, but I checked all the others (event ones with short 3 sec motion clips as well as mocord clips) and they are all affected.
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

This is very strange. I have a couple of suggestions.

1) Edit zm_db.php and change $db_debug to be true. Then reproduce the error and post what the SQL statement prior to it occuring is.
2) Run mysqlcheck on your DB to make sure there isn't some weird inconsistency in the DB causing it.
Phil
User avatar
ammaross
Posts: 61
Joined: Mon Mar 12, 2007 8:34 pm
Location: Utah, USA

Post by ammaross »

SQL statement causing the problem:

Code: Select all

select E.* from Events as E inner join Monitors as M on E.MonitorId = M.Id where E.StartTime <= '2007-12-20 12:32:08' order by E.StartTime desc
I'm not exactly sure why this statement needs to be run when I'm just trying to view a single event in non-DVR mode. I would also think there should be some AND E.MonitorId = '$monitorID' bit in there so it only runs through events for the monitor in question (since I did get to this through clicking the events for the past hour/day/etc for a specific camera...

I'll update this post if/when my manual SQL query of the above finishes... :wink: Should come up with about 122678 events.

mysqlcheck came up clean btw.

Update: You know it's bad when manually running the statement crashes a couple tables in the mysql db. :? Anyway, a little myisam repairing and db is back to normal, but problem still lurks.
ark
Posts: 6
Joined: Wed Jul 25, 2007 8:56 pm

I see this too

Post by ark »

I get the same error

I'm running 1.23.1 on ubuntu

I'm upto event 9114 right now.

anything else I can do to help?
paulf
Posts: 7
Joined: Mon Feb 11, 2008 2:40 pm

Post by paulf »

Bump with 1.23.1 on FC4.

However if I enable the 'DVR' mode in options, I get a dialog box asking for mootools to be installed. I don't have mootools, but the viewer plays after I click OK (but the nav buttons appear to be broken - I guess that's what mootools is for?).
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Correct, you can not use the DVR interface without having mootools installed.
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

The memory error problem has been addressed in another recent thread where I put a small patch up. However it is fixed in 1.23.2 if you can wait a few days.
Phil
paulf
Posts: 7
Joined: Mon Feb 11, 2008 2:40 pm

Post by paulf »

zoneminder wrote:The memory error problem has been addressed in another recent thread where I put a small patch up. However it is fixed in 1.23.2 if you can wait a few days.
To be honest the DVR interface is working great here (I found and installed mootools) so this is no longer an issue for me. Take your time :D
Locked