qanuj / elmah

Automatically exported from code.google.com/p/elmah
0 stars 0 forks source link

Elmah.Sqlite.db File Very Large #133

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install Elmah with Sqlite logging
2. Throw an exception

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
Current version (1.1)

Please provide any additional information below.

I set up Sqlite logging for ELMAH and my error log file is rapidly
ballooning in size. It was 384mb when I looked at it today after letting it
build up in my development environment for a few days. Testing further I
found that each time I throw an exception in my application the
Elmah.Sqlite.db file increases by about 20kb. This can't be right, can it?

My web.config settings:

 <elmah>
    <security allowRemoteAccess="yes" />
    <errorLog type="Elmah.SQLiteErrorLog, Elmah"
connectionStringName="Elmah.SQLite" />
  </elmah>

Original issue reported on code.google.com by laka...@gmail.com on 10 Sep 2009 at 12:42

GoogleCodeExporter commented 9 years ago
I've checked a web site running ELMAH 1.1 with SQLite as the backing store. At 
940 
logged errors, the SQLite database file was weighing in at 9MB. The size of the 
smallest and largest error was about 5.3KB and 25.5KB, respectively. Bear in 
mind, 
this was a database from a production site, not development as in your case.

I suggest you use a tool like SQLite Administrator, found at 
http://sqliteadmin.orbmu2k.de/, to run some of your own statistics to determine 
why 
the file size is so large. For example, I ran the following query on my SQLite 
errors database in SQLite Administrator to see more or less the distribution of 
errors by their KB:

select
  length(AllXml) / 1024 as KB,
  count(*) as Count
from error
group by
  length(AllXml) / 1024

The results I go were:

KB  | Count 
5   | 86 
6   | 169 
7   | 278 
8   | 127 
9   | 30 
10  | 15 
11  | 3 
12  | 80 
13  | 82 
14  | 7 
15  | 7 
16  | 15 
17  | 9 
18  | 13 
19  | 13 
20  | 1 
21  | 1 
22  | 3 
25  | 1 

It would help to compare what figures you are seeing with your database. This 
is not 
a perfect measure of file size and its growth, but one would imagine there is 
some 
correlation to sizes of the errors stored in there.

Original comment by azizatif on 10 Sep 2009 at 8:45

GoogleCodeExporter commented 9 years ago

Original comment by azizatif on 26 Sep 2010 at 7:49