Home > Domino Tips > True Domino Bloopers > True Domino Blooper #29: Agent OOPS
Domino Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

TRUE DOMINO BLOOPERS

True Domino Blooper #29: Agent OOPS


Ann Eulert
10.02.2003
Rating: -2.78- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


Did I ever tell you about the time I accidentally sent myself 80,000 mail messages?

We run Compact on our mail servers every night to squeeze out all the white space and to help users stay under their quotas. We had set up a monitor to help us identify which databases had more than 10% white space, indicating that they probably had not compacted successfully. However, the monitor was not working very well and failed to notify us when our vice president's mailbox did not compact.

So after that incident, I wrote an agent to scan our server logs looking for mail files that did not compact successfully overnight. It was set to run "Manually from Actions Menu" and was working beautifully. Whenever I ran it, it sent me a nice little list of mail files that had over 10% white space. However, I did not want to have to run the agent myself. I wanted it to run as a scheduled agent and to automatically send me this e-mail at 6:00 a.m. every morning.

I very cleverly changed the agent to run "On Schedule Daily," set it to run at 6:00 a.m., then saved the agent. Fortunately, this was around 4:30 p.m., when most of my co-workers call it a day and go home, because the agent took it upon itself to run immediately. Meanwhile, I was happily adding the code needed to ensure that it would only send me ONE message. By the time I realized that I should have added this code BEFORE I saved the agent, my mailbox was being flooded; the agent ran once for each document in the server log, which was about 80,000 documents, and promptly sent me 80,000 identical e-mails.

Our primary mail server had no problem handling this load, but my mailbox was on a smaller server being used to test new software (most of my management also had their mailboxes on this server). The smaller server quickly ran out of memory and crashed. As soon as I got it running again, the primary mail server dumped another load of messages into the mail.box and crashed it again. And again. And again. It was 7:30 p.m. before I finally got the backlog of messages cleared up, got the server back up and running again, and all the routers restarted.

As the mail.box got flooded with messages and crashed the server, I would rename the mail.box and let the server create a new one the next time it came up, so by the time all this was done, I had several mail.boxes with various names. I had to open the renamed mail.boxes and filter out all the messages I had sent myself without deleting the "good" messages that were also there. As the final step in cleaning up my mess, I needed to get these "good" messages back into a working mail.box so they could continue on their way. I decided to copy them from the renamed mail.box and paste them into the working mail.box. Then they should route just fine, right?

Well, sort of...they routed to the intended recipient just fine, but they ALL showed up as being from ME, instead of being from whoever had actually sent the message. Needless to say, that was noticed and caused a few questions.

I suspect that this little escapade cost me quite a few "Attaboys" and will be remembered in my next performance evaluation, but since most of the impact was limited to MY MANAGEMENT, there was no public flogging for this one.

In case anybody is feeling lucky, here's what needs to be done to set up the agent to run on YOUR servers:

  1. In the server log, create a view for the agent to use with the following alias: WHITE SPACE OVER 10.

    You can name the view anything you want, but I suggest: (White Space Over 10) View Selection Formula.

    Folder := @Left(Pathname ; "\" ) ; 
    SELECT (Form = "Activity" | Form = "Size") & @LowerCase(Folder) = "mail" & 
    @Round(DiskUsage * 100 / DiskSpace; 1) < 90
    The view should have a single, sorted column with the following Column Formula:
    PerCentUsed := @Round(DiskUsage * 100 / DiskSpace; 1) ; 
    MailboxSizeKB := @Round(DiskSpace / 1024); 
    MailboxSize := @If(MailboxSizeKB < 1024 ; "<1" ; @LeftBack(@Text(MailboxSizeKB) ; 3) ) ; 
    @Text(PerCentUsed) + "  %     " + 
    @If(@Length(MailboxSize) = 3 ; MailboxSize ; "  " + MailboxSize) + " MB       " + 
    @V2If(@IsAvailable(Title); Title; Pathname) 
    
  2. Create an agent scheduled to run daily at whatever time you want, preferably sometime after the Log task has finished. Suggested name for this agent: Send White Space E-Mail.

    Paste in the following formula and replace the "NotesAdmin" in the last line with whoever you want to receive the e-mail(s). (Note that the very first line is the one that tells the agent to send you only ONE e-mail!).

    SELECT Form = "Activity"  & Pathname = "log.nsf" ; 
    ListLookup := @DbColumn("":"NoCache" ; "":"" ; "WHITE SPACE OVER 10" ; 1) ; 
    ColumnHeaders := "   %         DB Size      Database Title" + @NewLine + 
    "Used" +@NewLine + @NewLine ; 
    MailboxList := @If(@IsError(ListLookup) ; "ERROR:  " + @Text(ListLookup) ; 
            ListLookup = "" ; "No Mailboxes  With Excess White Space Found" ; 
            @Implode(ListLookup ; @NewLine)) ; 
    MailSubject := @If(ListLookup = "" ; "No Mailboxes With Excess White Space Found" ; 
            "Mailboxes That Have Over 10% White Space") ; 
    MailMessage := @If(ListLookup = "" ; 
                    "No mailboxes with over 10% white space were found." ; 
            ColumnHeaders + MailboxList) ; 
    @MailSend( "NotesAdmin" ; "" ; "" ; MailSubject  ; MailMessage ; "" ) 
    


Do you have your own blooper? Send it in and claim your fame.

Every story in our bloopers series comes to us directly from a SearchDomino.com administrator, developer or consultant. For obvious reasons, some contributors choose to remain anonymous.

MORE ON THIS TOPIC:
Read all SearchDomino.com's true bloopers.

View our Best Web Links on Domino/Notes administration.


Rate this Tip
To rate tips, you must be a member of SearchDomino.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


RELATED CONTENT
True Domino Bloopers
True Domino Blooper #28: The Super Server Upgrade
True Domino Blooper #27: Blame it on Domino
True Domino Blooper #1: The Out-Of-Office nightmare
True Domino Blooper #2: Independence Day blunder
True Domino Blooper #3: Return to sender
True Domino Blooper #4: Extended directories or bust!
True Domino Blooper #5: I'm not a Notes expert, but I play one on TV
True Domino Blooper #7: AdminP worm unleashed
True Domino Blooper #8: With vacations like this, who needs work?
True Domino Blooper #9: Don't judge an address book by its cover

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.

HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 1999 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts