By User on Monday, 30 March 2020
Posted in General Issues
Likes 0
Views 609
Votes 0
Hello. In my DataBase #_social_notifications is 2+ Gb. It's too much.
How can I make it less?

I already set this option:
General settings > Notifications > Automated Cleanup
Enable Automated Cleanup: ON
Cleanup Notifications Older Than: 3 months
it is the lowest value.

How can I be sure that cronjob works correctly? It success convert videos, send emails etc.

Thanks.
I think your Cronjob should be work correctly is because system can able to automatically send out the pending email.

Currently that "Notification Automated Cleanup" feature will only remove if the notification created 3 month ago and the notification mark it as read.

I suspect a lot of notification user haven't read it yet and this is why it keep store into your database.

You can run this following SQL query to check from database :


select count(*) from `#__social_notifications` WHERE DATE_ADD(`created`, INTERVAL 3 MONTH) <= '2020-03-30 00:00:00' AND `state` = 0;


If you would like to delete quickly and do not want to check for the notification read state, you can run this following query :


DELETE FROM `#__social_notifications` WHERE DATE_ADD(`created`, INTERVAL 3 MONTH) <= '2020-03-30 00:00:00';


Remember replace #__ to your table prefix before execute it.
·
Monday, 30 March 2020 09:56
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello.
You can run this following SQL query to check from database :
select count(*) from `#__social_notifications` WHERE DATE_ADD(`created`, INTERVAL 3 MONTH) <= '2020-03-30 00:00:00' AND `state` = 0;
System display 0 lines. So, seems everything works normal and it's just lots of notifications there?
Thanks.
·
Monday, 30 March 2020 22:24
·
0 Likes
·
0 Votes
·
0 Comments
·
If you get 0 result mean there do not have any unread notification last 3 month (before the date 2019 Nov 30).

You can try execute this following SQL query again :


select count(*) from `#__social_notifications` WHERE DATE_ADD(`created`, INTERVAL 3 MONTH) <= '2020-03-31 00:00:00' AND `state` = 1;


If there got result, then you can run this delete SQL query :


DELETE FROM `#__social_notifications` WHERE DATE_ADD(`created`, INTERVAL 3 MONTH) <= '2020-03-31 00:00:00';
·
Tuesday, 31 March 2020 09:57
·
0 Likes
·
0 Votes
·
0 Comments
·
Currently that "Notification Automated Cleanup" feature will only remove if the notification created 3 month ago and the notification mark it as read.
Hello. Sorry, my English is bad. Notification will be cleared only if 2 condition (both / not one of them)?
1) user marked it as read
2) the notification created 3 month

At the moment at my site #_social_notifications is 1.8 Gb.
First notification created 2019-12-31 00:43:1

So I need to remove it in DataBase manually every time (by using provided SQL query in previous post)?

Or something going wrong on site (site should clear it itself, but doesn't do it)?

Can be something improved in EasySocial to clear it?

Thank.
·
Monday, 01 February 2021 04:32
·
0 Likes
·
0 Votes
·
0 Comments
·
If your first notification start last month, which mean that system will not automatically delete it because the notification created date should be created 3 months ago then the only auto delete it.

Perhaps we can add one more option "1 Month" for the cleanup notification period in the next release version.
·
Monday, 01 February 2021 09:58
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello, I posted feature request there https://stackideas.com/voices/easysocial/item/511-automated-cleanup-of-all-notification-ol

Suggestion sis to allow admin purge any notification (not only marked as read).

I tried to apply SQL query, but 4.000.000+ notification makes server down and eroor 504.

So I had to clear all notification in PhpMyAdmin.

Thanks.
·
Tuesday, 02 February 2021 01:16
·
0 Likes
·
0 Votes
·
0 Comments
·
We will see if we can do something about this in Easysocial 4.0 before the release stable version.
·
Tuesday, 02 February 2021 10:28
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post