Deleting events issues

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
geraldbrandt
Posts: 129
Joined: Tue Dec 09, 2014 10:20 pm

Deleting events issues

Post by geraldbrandt »

Deleting multiple events doesn't seem to work properly. For example, if I display 200 events per page with 398 events for the monitor, and select all 200 events, clicking delete only deletes a handful of events instead of all 200. Is anyone else seeing the same thing?
ergamus
Posts: 27
Joined: Sat May 29, 2021 10:09 am

Re: Deleting events issues

Post by ergamus »

I can see this behavior on my end as well. I tried deleting 200 of my oldest events, and it removed maybe 100~or so. But after manually refreshing the page, it shows all 200 events removed correctly.

I think what's happening is that when you delete events, it triggers a delete query on the server and then refreshes the page, even if the deletion is still in progress in the background.

Previously in 1.34 the browser would be stuck waiting on a reply until the deletion query finished, which meant you might get back a response timeout error if your server wasn't fast enough. I remember increasing the timeout for queries and HTTP responses to 600 seconds because of this, back when I didn't know how to use filters and deleted everything manually.
geraldbrandt
Posts: 129
Joined: Tue Dec 09, 2014 10:20 pm

Re: Deleting events issues

Post by geraldbrandt »

Ahh. Next time I do a mass delete, I'll check that.
px03afk
Posts: 77
Joined: Wed Nov 30, 2011 4:53 pm

Re: Deleting events issues

Post by px03afk »

I am seeing the same effect and I am reasonably sure that the problem is the page refreshing while the delete is in progress. The other thing here is that when you click on Delete on the prompt nothing happens whereas on the previous system the prompt disappeared.
px03afk
Posts: 77
Joined: Wed Nov 30, 2011 4:53 pm

Re: Deleting events issues

Post by px03afk »

I have also discovered that there is a significant delay in getting the count on the console update. I just asked the even view to delete all events. When it refreshed there was still a long list. The console had a different number so I went back to the event list but the top event couldn't be found and when I refreshed they had all gone. I never noticed these problems with previous versions.
px03afk
Posts: 77
Joined: Wed Nov 30, 2011 4:53 pm

Re: Deleting events issues

Post by px03afk »

I just confirmed that the problem seems to be the refresh of the event list. If I manually refresh the events will eventually all disappear so the problem is that the view is definitely refreshing before the background task has completed.
px03afk
Posts: 77
Joined: Wed Nov 30, 2011 4:53 pm

Re: Deleting events issues

Post by px03afk »

I just deleted around 70 events and went back to the console and refreshed it 5 or 6 times before the count reached zero. Is there something my system is doing to slow down the delete processing? On previous versions of ZM the delete confirm would stay there until the delete was complete so maybe there is no difference, other than the system is returning sooner.
px03afk
Posts: 77
Joined: Wed Nov 30, 2011 4:53 pm

Re: Deleting events issues

Post by px03afk »

I have just come across another problem when trying to delete events. When the Events count is over a value I have yet to determine, but possibly 500, if I view ALL events and select all of them and then click Delete and confirm, nothing gets deleted.
Sigge
Posts: 116
Joined: Mon May 02, 2016 8:14 am

Re: Deleting events issues

Post by Sigge »

I am seeing this too. How do I delete events when they are over 800?
px03afk
Posts: 77
Joined: Wed Nov 30, 2011 4:53 pm

Re: Deleting events issues

Post by px03afk »

If one of the columns of Day, Hour, Week or Month is below the failing number then open those first and they should delete.
px03afk
Posts: 77
Joined: Wed Nov 30, 2011 4:53 pm

Re: Deleting events issues

Post by px03afk »

It seems as though the limit is around 570 rows.
Post Reply