Problem with Surveys sending out to Inactive users

We recently ran into an issue where our WHD was slowing down randomly while working within the tickets side of things.  After working with support for a few weeks on the issue, it appears that our system is still attempting to send out surveys and reminders to people who are no longer active.  Apparently this was caused by me.  A few months ago, I made a new survey for support requests.  I set it as the default survey with 2 reminders.  I then set it to go to closed requests.  What I didn't realize would happen was it would send it all closed tickets at that time.  We had somewhere in the neighborhood of 16,000 closed tickets at that time.  Needless to say people received several survey requests and reminders over the next few days.  Fast forward a few months, and the system is still trying to send surveys and reminders out to inactive accounts.  The attempt fails and instead of just erroring out, will attempt to send out the email again. This will happen over and over again.  I've since deleted out the survey with a hope that would fix the issue.  Unfortunately support feels we may need to wait this out.  Can anyone else think of a way to clear these requests out?  My support techs are good folks, but I can see the frustration in their faces when they attempt to use WHD and it bogs down.  Any suggestions here would be greatly appreciated. 

  • First off, I know this was over 4 years ago but I happened to come across this question looking for an answer. We discovered today that this was happening on our system as well (running WHD version 12.7.4) creating very large whd.log files which were about 0.5 GB a day.

    I actually decided to dig into our SQL database and I wrote the following which resolved our issue. I am sure it could be modified to address other DB types.

    Simply, this goes in and finds all SURVEY_RESPONSES with the INVITATION_COUNT less than the configured SURVEY max invitation count for all INACTIVE (deleted) users or users that had a blank email address (the system tries to send emails to these users as well) and it sets the SURVEY_RESPONSE invitation count field to the surveys max invitation count setting so that the system thinks that it has already sent the last email invitation.

    Of course, I'd recommend testing and backing up your database before testing in your environment.

    This would have to be scheduled to run regularly for users who become inactive later on.

    UPDATE SURVEY_RESPONSE 
    
    SET INVITATION_COUNT = s.MAX_EMAIL_INVITATIONS
    
    FROM CLIENT c
    
    JOIN SURVEY_RESPONSE sr ON
    	c.CLIENT_ID = sr.CLIENT_ID
    
    JOIN SURVEY s ON
    	sr.SURVEY_ID = s.ID 
    
    WHERE (c.DELETED = 1 OR COALESCE(c.EMAIL,'') = '') AND sr.INVITATION_COUNT < s.MAX_EMAIL_INVITATIONS