Database size

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
abgar
Normal user
Normal user
Posts: 93
Joined: 2005-03-23 09:33
Location: Warsaw, Poland

Database size

Post by abgar » 2015-03-03 15:17

Excuse me in advance because maybe problem is trivial. I use hmail for many years but I am not expert in databases - I do not need too.
I was investigating: why hmail takes so much place on disk.
Hmail data folder is about 7GB while mysql data folder ( mysql holds hmail data only ) is over 11GB !
Searching through mysql tables i found that probably "hm_deliverylog_recipients" is the reason of such big database size. It hold over 800 000 records.

Am I right ?
Is there a way to shrink it or clean ?

User avatar
mattg
Moderator
Moderator
Posts: 20134
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: Database size

Post by mattg » 2015-03-03 16:30

So you have turned delivery logging on, and now wonder if it is needed?

What version of hMailserver are you running? Delivery Log was dropped back in version 4.4 and was not carried to version 5.0, except by optional script.

If that table still has data added to it, then you are either on a very old version of hMailserver and should upgrade (AND someone turned Delivery log ON - it was off by default)
OR
someone has added this script >> viewtopic.php?f=20&t=13890 to a version newer than 5.0

YES, you SHOULD clean the HM_Deliverylog_ tables regularly
This external software also must empty the delivery log database table from time to time, since you may run out of disk space otherwise. Also, if the table is never emptied, the database will become big and backups and other operations on the database will become increasingly slower.
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

abgar
Normal user
Normal user
Posts: 93
Joined: 2005-03-23 09:33
Location: Warsaw, Poland

Re: Database size

Post by abgar » 2015-03-03 18:20

mattg wrote:What version of hMailserver are you running? Delivery Log was dropped back in version 4.4 and was not carried to version 5.0, except by optional script.
5.4.1.
I understand what happened. Since 4.4 logging was switched off but these db enrties ale older and not deleted.
Thanks
------------
I cleared the log but mysql database has not shrinked :cry: ssstill over 10GB
Messages table holds 46 303 records. I think not so much ?

Hazark
New user
New user
Posts: 26
Joined: 2014-05-08 23:17

Re: Database size

Post by Hazark » 2015-03-04 15:56

abgar wrote:
mattg wrote:What version of hMailserver are you running? Delivery Log was dropped back in version 4.4 and was not carried to version 5.0, except by optional script.
5.4.1.
I understand what happened. Since 4.4 logging was switched off but these db enrties ale older and not deleted.
Thanks
------------
I cleared the log but mysql database has not shrinked :cry: ssstill over 10GB
Messages table holds 46 303 records. I think not so much ?
MySQL don't automatically release used disk space in their data files.
More info: http://stackoverflow.com/questions/3456 ... 85#3456885

Post Reply