View Full Version : Turning off SQL logging in Miva 5
Tim1stEasy
03-30-06, 01:14 PM
Hi,
I have a problem with a few of our Miva 5 stores, where the sql.log file is growing huge each day (when we first started using Miva 5, we were leaving the SQL logging enabled). As a work-around, I have created a log rotate script to handle these files each day, unfortunately this doesn't run often enough for one of our customer's stores and he hits his disk quota limit fairly often.
Rather than just make my log rotate script run more frequently I was wondering if anyone knows how to disable the SQL logging functionality of Miva 5. I haven't been able to find any settings regarding this in any config files or within the admin interface.
Cheers,
Tim
ILoveHostasaurus
03-30-06, 03:24 PM
It's very easy Tim, just edit the merchdb.dat file in your site's mivadata folder and the very last part of the only line in the file will say "log", just remove it so the line ends with | and that will turn it off.
has it any effect on performance of miva?
ILoveHostasaurus
03-30-06, 04:00 PM
Yes, turning logging off should produce a noticeable increase in performance if the sites have heavy traffic.
Tim1stEasy
03-30-06, 04:25 PM
Thanks for the info David.
I've turned it off now.
I'm not surprised that it would be a performance drain - with all the entries that were flying into this particular log, it probably caused quite an IO overhead.
Cheers,
Tim
Sql logging cause the same issue with one of my clients. I turned off the logging as per this post. I think Miva should create a rolling log, that would be nice.
Thanks for the helpful post.
Tim1stEasy
08-11-06, 04:20 PM
I think Miva should create a rolling log, that would be nice.
If you are hosting on a Linux platform and you do want to keep the logging enabled, you could always create a logrotate script that would do this for you.
Something like the following would keep the logs rotating:
In /etc/logrotate.d, create a file called 'mm5' with the contents below
/var/www/mivadata/sql.log {
missingok
}
Depending on where your sql.log is located, you may need to adjust the path above. Also, your logrotate configuration may be set up slightly differently to ours, so you may need to put more instructions in this file, rather than just 'missingok'. You would need to check the logrotate documentation to see what other configuration options you may need.
Cheers,
Tim
Thanks Tim, we run a windows 2003 server. I can write a windows service that monitors the log, when it reaches a given size, I can archive it. If anyone is interested in such a service, let me know.
ILoveHostasaurus
08-11-06, 05:06 PM
The sql log logs a very significant amount of data, I would not recommend leaving it on in a production store as it will definitely decrease performance if the store has normal traffic.
vBulletin® v3.7.4, Copyright ©2000-2008, Jelsoft Enterprises Ltd.