I have random hangs as well. I've learned to accept it. However, what I've done is write a vb.net program that queries the AR System Email Messages form for Send Message = 'Yes' and gets a count of those. If the count surpasses a certain threshold, I then send myself an email. I need to tweak it to where it will do a net stop and net start on the BMC Remedy Email Engine service so that it will recover on its own. I have a scheduled task, or maybe an SQL Server Agent job that runs this every 30 minutes or so and it works marvelously for me. It's basically very simple, below is some of the code (written in vb.net):
************************ Dim myConnection As SqlConnection = New SqlConnection("Server=<SQL Server>;UID=<SQL User>;PWD=<SQL DB Password>;Database=ARSystem") Dim myQuery As String = "SELECT count(*) FROM dbo.AR_System_Email_Messages WHERE Send_Message = 1" Dim myCount As New SqlCommand(myQuery, myConnection) Dim count As Integer Dim toAddr As String = "<my email address>" ************************ myConnection.Open() Dim drCount As SqlDataReader = myCount.ExecuteReader() While drCount.Read() count = drCount(0) End While myConnection.Close() If count > 0 Then SendEmail(toAddr, fromAddr, subject, body) End If ************************ Sub SendEmail(ByVal ToAddress As String, ByVal FromAddress As String, ByVal Subject As String, ByVal Body As String) 'Create the MailMessage instance Dim message As New MailMessage(FromAddress, ToAddress) 'Assign the MailMessage's properties message.Subject = Subject message.Body = Body message.IsBodyHtml = False 'Create the SmtpClient object Dim smtp As New SmtpClient smtp.Host = "<SMTP Server Address>" smtp.Port = "<SMTP Server Email Port (Defaults to 25)>" smtp.Send(message) End Sub ************************ That's most of it. There are some variables which I've not shown here, such as the subject and the body. I have those preset as either constants or as variables. It's pretty simple and it works nicely. I was giogn to originally put an escalation on the remedy email form to mail me if the email engine hung, but you get a catch 22 because the email engine is hung, so the email never goes out.... So, my best solution was to use VB.NET to do it for me. Thanks, Gary Opela, Jr. Remedy Engineer ITIL V3 Foundations Certified Avaya Phone Support CNI/IT Tinker 72 SC (405) 582-4272 -----Original Message----- From: Action Request System discussion list(ARSList) [mailto:arslist@arslist.org] On Behalf Of Jason Miller Sent: Tuesday, March 29, 2011 10:51 AM To: arslist@arslist.org Subject: Re: Email Issue ** We too have had issues with various versions over the years with 7.5 being the worst. We have an escalation form where we keep "service" type escalations. We have a control records and an escalation that fires every 10 minutes and does a set fields on that record where: 'Send Message' = "Yes" AND 'Create Date' > $TIMESTAMP$ - 60 * 60 AND 'Create Date' <= $TIMESTAMP$ - 60 * 11 If there is a match the 'Email ID' from one record is set in a field and our process runs to restart the service. The process is a batch file that writes to a log, stops the service, cleans up some temp email engine, pauses and restarts the email engine. It works so well we have forgotten it there is a problem still. Looking at the log we can go a days without issue and some days it restarts throughout the day. We definitely see more restarts on busier days. Here is the content of the batch: ******************** @Echo Off Rem Stops and starts Email engine if messages are not being sent on a timely basis echo ***** %date% %TIME% -- Email Engine stopped sending emails, restarting >> "D:\Logs\EmailEngine.log" net stop "BMC Remedy Email Engine - OURSERVERNAME 1" >> "D:\Logs\EmailEngine.log" c: cd "C:\Users\ServiceAccountName\AppData\Local\Temp\" @Echo Deleting temp files in C:\Users\ServiceAccountName\AppData\Local\Temp\ >> "D:\Logs\EmailEngine.log" del AT*.tmp email*.eml email*.txt email*.rtf chk*.tmp email*.html red*.tmp email*.msg red*tmp E*_*.tmp rem the ping is just a pause to allow previous task to finish ping 1.0.0.0 -n 1 -w 5000 >NUL net start "BMC Remedy Email Engine - OURSERVERNAME 1" >> "D:\Logs\EmailEngine.log" _______________________________________________________________________________ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org attend wwrug11 www.wwrug.com ARSList: "Where the Answers Are"