Log file MSSQL too big

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
alescan
Normal user
Normal user
Posts: 45
Joined: 2014-11-11 17:29
Location: Italy
Contact:

Log file MSSQL too big

Post by alescan » 2014-11-14 10:14

Hello everyone,
I use hmailserver by a year and a half and I was fine apart some little problem at the beginning but it is normal.
I am writing because I have a doubt on the file of the DB (using mssql 2008) as shown in attachment
Immagine.png
the file of the DB itself is very small but the log file is abnormal.
I wanted to know if it is normal or if there is some problem.

Thanks to all

Hello
HMS 5.6.7 B2425 on Win Server 2016 Standard with SQL Server 2014 SP2

percepts
Senior user
Senior user
Posts: 5282
Joined: 2009-10-20 16:33
Location: Sceptred Isle

Re: Log file MSSQL too big

Post by percepts » 2014-11-15 01:15

log files need to archived off (rotated) and cleared down oterwise they get bigger and bigger and bigger and bigger and bigger.....

that is part of your SQL server maintenance which you should be doing. It seems you aren't. Naughty boy.

And NO it is not part of hmail maintenance. Note I said SQL server maintenance and NOT hmail database maintenance which is something else and is handled internally by hmail without you having to do anything.

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

Re: Log file MSSQL too big

Post by mattg » 2014-11-15 02:03

ALSO, as I said in the other thread where you posted this, you should check the log files to see what is making them so big.

Log files aren't normally that large.
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

alescan
Normal user
Normal user
Posts: 45
Joined: 2014-11-11 17:29
Location: Italy
Contact:

Re: Log file MSSQL too big

Post by alescan » 2014-11-17 10:41

percepts wrote:log files need to archived off (rotated) and cleared down oterwise they get bigger and bigger and bigger and bigger and bigger.....

that is part of your SQL server maintenance which you should be doing. It seems you aren't. Naughty boy.

And NO it is not part of hmail maintenance. Note I said SQL server maintenance and NOT hmail database maintenance which is something else and is handled internally by hmail without you having to do anything.
How can I do that, I have other databases but no one log files is this big and i don't do anything also to them.
HMS 5.6.7 B2425 on Win Server 2016 Standard with SQL Server 2014 SP2

percepts
Senior user
Senior user
Posts: 5282
Joined: 2009-10-20 16:33
Location: Sceptred Isle

Re: Log file MSSQL too big

Post by percepts » 2014-11-17 10:58

its upto you how you do it, its not an hmail function.

some vbscript or .bat run from task scheduler will do it. Its upto you to write the code, you're the database administrator.
Or you can just do it manually by moving it somewhere else and restart sql server which should create a new one. Well MySQL does, I don't know about MSSQL.

And are you telling us that you have several DB applications sharing the log file? That is why it isn't an hmail function and you haven't told us if its size due solely to hmail or its combined from several database applications which would at least be a partial explanation of its size.

alescan
Normal user
Normal user
Posts: 45
Joined: 2014-11-11 17:29
Location: Italy
Contact:

Re: Log file MSSQL too big

Post by alescan » 2014-11-17 11:07

percepts wrote:its upto you how you do it, its not an hmail function.

some vbscript or .bat run from task scheduler will do it. Its upto you to write the code, you're the database administrator.
Or you can just do it manually by moving it somewhere else and restart sql server which should create a new one. Well MySQL does, I don't know about MSSQL.

And are you telling us that you have several DB applications sharing the log file? That is why it isn't an hmail function and you haven't told us if its size due solely to hmail or its combined from several database applications which would at least be a partial explanation of its size.
No every database have it own logfile but only this one is so big.
I opened the log file like mattg suggest me and I found this
Immagine.png

it continues to do fetchaccount litterally every second. I take a look to the past month and it's all like this.
HMS 5.6.7 B2425 on Win Server 2016 Standard with SQL Server 2014 SP2

percepts
Senior user
Senior user
Posts: 5282
Joined: 2009-10-20 16:33
Location: Sceptred Isle

Re: Log file MSSQL too big

Post by percepts » 2014-11-17 11:44

have you got POP logging switched on in hmail? If not then switch it on and see what/who is doing those fetches.

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

Re: Log file MSSQL too big

Post by mattg » 2014-11-17 11:45

Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

percepts
Senior user
Senior user
Posts: 5282
Joined: 2009-10-20 16:33
Location: Sceptred Isle

Re: Log file MSSQL too big

Post by percepts » 2014-11-17 12:00

Infact I would switch on all logging options as it may be IMAP too although I don't think IMAP does updates like that but not too sure about that.

alescan
Normal user
Normal user
Posts: 45
Joined: 2014-11-11 17:29
Location: Italy
Contact:

Re: Log file MSSQL too big

Post by alescan » 2014-11-17 12:04

percepts wrote:have you got POP logging switched on in hmail? If not then switch it on and see what/who is doing those fetches.
For every account that i have on the server there is those lines:
"DEBUG" 8972 "2014-11-17 10:56:19.739" "Adding task ExternalFetchTask to work queue External fetch queue"
"DEBUG" 4436 "2014-11-17 10:56:19.739" "Executing task ExternalFetchTask in work queue External fetch queue"
"DEBUG" 4436 "2014-11-17 10:56:19.739" "Retrieving messages from external account contabilita"
"DEBUG" 4436 "2014-11-17 10:56:19.740" "Creating session 51760"
"TCPIP" 4436 "2014-11-17 10:56:19.740" "Connecting to 62.149.128.179:995..."

but it's not every seconds, it's every minutes cause i set to control for new email every 1 minutes.
If I shrink the logfile i don't solve the problem that it's doing transaction every seconds.
HMS 5.6.7 B2425 on Win Server 2016 Standard with SQL Server 2014 SP2

percepts
Senior user
Senior user
Posts: 5282
Joined: 2009-10-20 16:33
Location: Sceptred Isle

Re: Log file MSSQL too big

Post by percepts » 2014-11-17 12:28

but those logs do show every minute. There are several every second and then a gap for minute and then another group and then another gap of a minute etc etc.

how many accounts do you have doing this?

A a test try setting the fetch to every 5 minutes on all of them and see what difference that makes to your logs.

alescan
Normal user
Normal user
Posts: 45
Joined: 2014-11-11 17:29
Location: Italy
Contact:

Re: Log file MSSQL too big

Post by alescan » 2014-11-17 12:41

percepts wrote:but those logs do show every minute. There are several every second and then a gap for minute and then another group and then another gap of a minute etc etc.

how many accounts do you have doing this?

A a test try setting the fetch to every 5 minutes on all of them and see what difference that makes to your logs.
Now that you asked, I look again to the SQL logfile, and i noticed that is not every second but every minutes, so it could be that i have to do like mattg suggest, shrink the file.
HMS 5.6.7 B2425 on Win Server 2016 Standard with SQL Server 2014 SP2

percepts
Senior user
Senior user
Posts: 5282
Joined: 2009-10-20 16:33
Location: Sceptred Isle

Re: Log file MSSQL too big

Post by percepts » 2014-11-17 12:44

Yes that would be a good idea otherwise it will just get bigger and bigger.

Post Reply