Just a FYI, found that the MAIL table was partially corrupted. Had to use myisamchk utility to update, fix and recover. When all said and done, if you are using MySQL, then you may want to use that tool from time to time to make sure your data tables are ok... 8^}

Also used RoboCopy to deal with the 48K leftover files, thanks for that tip!

Also used RoboCopy to copy contents from the folders that were highly used to new folders (then deleted the old and renamed to old name) so as to reduce fragmentation problems on the directory.

I'd say that the server is at least 20x faster now.

Steve



At 10:47 AM 12/5/2006, Stephen Garrett wrote:

Hi all,

I think you've recently read my problem with all of the files that are stacking up on my mail server. Kym was kind enough to send me a script to correlate files on disk with database, then mend things appropriately.

This script is running, but nothing is being deleted within the IMS MYSQL Database! The output says it is. The log file says the deletes occurred. The extra logging within the cfcatch never happens...

So, for your perusal, I am showing the following code. I can see nothing wrong with it. No errors are generated. Each Delete consumes about 2 seconds of MySQL Processor time. But, the deletes never happen. I will repeat this. The deletes never happen from the database.

I've been running IMS for over two years now, I have no clue as to why this could be happening. At this point I now have over 48k rows in the "Mail" table.

Thanks for any light anyone can shed...

Steve
p.s. I've added a space after the angle brackets to get by the XML/HTML email filters... p.p.s. I let this run over night and it just keeps trying to delete the same rows over and over.
=====
[snippet]
< cfquery name="getFiles" datasource="#iMS#" Maxrows=100>
        select FileName
                from Mail
< /cfquery>
< cfoutput>
< strong>There are #getFiles.RecordCount# files in the database<p>< /strong>
< /cfoutput>
< cffile action="APPEND" file="#request.MMLogPath#CleanMsgFldr.log" output="There are #getFiles.RecordCount# files in the database">

< cfif DoDB>
Starting Surplus Database deletes at < cfoutput>#now()#< /cfoutput>...<br>
        < cfset loopcounter=0>
        < cfset counter=0>
        < cfset BadCounter=0>

        < cfloop query="getFiles">
                < cfif not FileExists("#getFiles.Filename#")>
                        < cftry>
< cfoutput>Deleting #getFiles.Filename# at #now()#<br></cfoutput> < cffile action="APPEND" file="#request.MMLogPath#CleanMsgFldr.log" output="Deleting #getFiles.Filename# at #now()#">
                                < cfquery name="Del" datasource="#iMS#">
                                        DELETE FROM mail
WHERE FileName = '#getFiles.Filename#'
                                < /cfquery>
                                < cfcatch type="Any">
                                        < cfset BadCounter=BadCounter+1>
< cffile action="APPEND" file="#request.MMLogPath#CleanMsgFldr.log" output="*** ERROR Deleting #getFiles.Filename#">
                                < /cfcatch>
                        < /cftry>
            < cfset counter=counter+1>
                < /cfif>
                < cfset loopcounter=loopcounter+1>
                < cfif counter eq timesround>< cfbreak></cfif>
< CFX_SLEEP SLEEPTIME=2><!--- wait a bit to give system a CPU break --->
        < /cfloop>

Log Snippets follow:

Starting Clean message Folder Run: {ts '2006-12-04 17:45:49'}
There are 100 files in the database
Deleting G:\iMS\Mail\gslcorp.com\steve\5af05c38e7d8194093b37d72d9858ba5.mail at {ts '2006-12-04 17:46:05'} Deleting G:\iMS\Mail\gslcorp.com\steve\a1ad2d3a74cb4b49b2b1cd98722454b7.mail at {ts '2006-12-04 17:46:11'}
.....
Starting Clean message Folder Run: {ts '2006-12-04 17:57:43'}
There are 100 files in the database
Deleting G:\iMS\Mail\gslcorp.com\steve\5af05c38e7d8194093b37d72d9858ba5.mail at {ts '2006-12-04 17:58:00'} Deleting G:\iMS\Mail\gslcorp.com\steve\a1ad2d3a74cb4b49b2b1cd98722454b7.mail at {ts '2006-12-04 17:58:06'}
.....
Starting Clean message Folder Run: {ts '2006-12-05 07:49:24'}
There are 100 files in the database
Deleting G:\iMS\Mail\gslcorp.com\steve\5af05c38e7d8194093b37d72d9858ba5.mail at {ts '2006-12-05 07:49:44'} Deleting G:\iMS\Mail\gslcorp.com\steve\a1ad2d3a74cb4b49b2b1cd98722454b7.mail at {ts '2006-12-05 07:49:49'}
....

==^=======================================================
This list server is Powered by iMS  "The Swiss Army Knife of Mail Servers"
--------------------------------------------------------------------------------------
This list is provided as a free service.  Although we will try to address issues
in a timely manner, support via this list is not guaranteed.  If you require 
expedited
support then a support contract is required.  Support may be purchased from
http://www.coolfusion.com/commerce.  Details regarding support options may be 
reviewed
at: http://www.coolfusion.com/SupportOptions.cfm
--------------------------------------------------------------------------------------
To leave this list please complete the form at 
http://www.coolfusion.com/Support/
Need an iMS Developer license?  Sign up for a free license here:
http://www.coolfusion.com/Developers/
List archives: http://www.coolfusion.com/cfbb/
Note: You are subscribed as archive_jab_org / [email protected]
==^=======================================================


Reply via email to