+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Newsletter sending hangs

Newsletter sending hangs

12 posts, 0 answered
  1. Maarten van de Waarsenburg
    Maarten van de Waarsenburg avatar
    2 posts
    Registered:
    30 Jun 2010
    15 Oct 2010
    Link to this post
    In Sitefinity 3.7 SP3 I'm sending a newsletter to over 600 subscribers. It hangs overnight at 17%.

    How should I proceed if I don't want subscribers to receive a second copy?

    Cheers.
  2. Flavio Cometto
    Flavio Cometto avatar
    14 posts
    Registered:
    17 Oct 2009
    15 Oct 2010
    Link to this post
    Hi Marteen,
    I had same problem few weeks ago. please check this thread http://www.sitefinity.com/devnet/forums/sitefinity-3-x/developing-with-sitefinity/stop-sending-newsletter.aspx#1358452

    I solved incrementing page execution timeout as follow:

    <!-- Sets the allowed upload file size and execution timeout
         FC: 27/09/2010: executionTimeout must be set to 3600 in order to give
         enough time to notification service thread used in newsletter send process -->
      <httpRuntime maxRequestLength="51200" executionTimeout="3600" />

    I'll hope this help you.

    BR

    Flavio
  3. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    15 Oct 2010
    Link to this post
    Hi Maarten,


    You could also take a look at Newsletters module not sending e-mails.

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  4. Maarten van de Waarsenburg
    Maarten van de Waarsenburg avatar
    2 posts
    Registered:
    30 Jun 2010
    15 Oct 2010
    Link to this post
    Thanks both for your prompt replies.

    To Flavio:
    I'm still running Sitefinity 3.7 SP3 on Windows Server 2003 R2 SP2 with IIS 6.0 and ASP .Net 2.0. As far as I can see, the article you are referring to relates to IIS 7.5 and ASP .Net 4.0. I wouldn't know what would be applicable to me in that article. But I'll have a look if I can increase the timeout.

    To Ivan:
    I've looked at the Knowledge Base article. The SendingInterval is already at a 1000 (milliseconds I suppose).

    I don't know anything about ASP. If you compare Sitefinity to a car, I am the driver not the mechanic. But the last code snippet looks very interesting.

    Would you have an ASP page that I can run that reports/deletes faulty e-mail and first and last name in the subscriber list?

    To both:
    When this problem is solved eventually, how do I resume sending? That is, not having it to send again and some subscribers getting the newsletter twice?

    This is what I found in the event log

    ----------------------------------------------------------------------------------------
    Event code: 3001
    Event message: The request has been aborted.
    Event time: 10/14/2010 3:12:41 PM
    Event time (UTC): 10/14/2010 1:12:41 PM
    Event ID: 44eecacc3ffd4d90a06fe4820eb97225
    Event sequence: 109
    Event occurrence: 1
    Event detail code: 0
     
    Application information:
        Application domain: /LM/W3SVC/1831898534/Root-4-129315340911155000
        Trust level: Full
        Application Virtual Path: /
        Application Path: C:\Program Files\telerik\Sitefinity3.7\WebSites\Community\
        Machine name: OTAPORTAL
     
    Process information:
        Process ID: 640
        Process name: w3wp.exe
        Account name: NT AUTHORITY\NETWORK SERVICE
     
    Exception information:
        Exception type: HttpException
        Exception message: Request timed out.
     
    Request information:
        Request URL: http://community.verum.com/Sitefinity/Admin/Services/MailingWebService.asmx?WSDL
        Request path: /Sitefinity/Admin/Services/MailingWebService.asmx
        User host address: 127.0.0.1
        User: xxx 
        Is authenticated: True
        Authentication Type: Forms
        Thread account name: NT AUTHORITY\NETWORK SERVICE
     
    Thread information:
        Thread ID: 1
        Thread account name: NT AUTHORITY\NETWORK SERVICE
        Is impersonating: False
        Stack trace:
     
     ----------------------------------------------------------------------------------------
  5. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    18 Oct 2010
    Link to this post
    Hi Maarten,

    Below is a sample code that you can use to validate subscribers' email address.

    using System; 
    using System.Collections.Generic; 
    using System.Linq; 
    using System.Web; 
    using System.Web.UI; 
    using System.Web.UI.WebControls; 
      
    public partial class TestEmails : System.Web.UI.Page 
        protected void Page_Load(object sender, EventArgs e) 
        
           string stringExpression = @"^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}"
                                   @"\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\"
                                   @".)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$"
            System.Text.RegularExpressions.Regex emailRegex = new System.Text.RegularExpressions.Regex(emailStrRegex); 
            Telerik.Notifications.Newsletters.DataManager Manager = new Telerik.Notifications.Newsletters.DataManager(); 
            int Count = 0; 
            int Count1 = 0; 
            foreach (Telerik.Newsletters.ISubscriber subscriber in Manager .GetSubscribers()) 
            {
                Count++; 
                if (!emailRegex.IsMatch(subscriber.Email)) 
                          
                        Response.Write(email + "<br>"); 
                        Count1++; 
                
            
              
        
    }

    You are getting timeout from the web service, which means that there is not response from the server - the sever  has rejected to send email data, because of some limitations to
    • executionTimeout
    • maxRequestLength
    You could take a look at this article.

    You could set maxRequestLength to "2097151". This is the max value you can use. You could also run the project in debug mode to see if there is any difference - when you are in debug mode the timeout is also set to max value.

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. Marnix
    Marnix avatar
    5 posts
    Registered:
    09 Oct 2006
    18 Oct 2010
    Link to this post
    Hi All,

    I'm working with Maarten to get the newsletters to work. 
    Ivan's code is a bit buggy but I got it working. I also turned it into a page in stead of code-behind to make it easier to use:
    <%@ Page language="C#" AutoEventWireup="true" %>
    <script runat="server">
    protected void Page_Load(object sender, EventArgs e)
    {
      string emailStrRegex = @"^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}" +
                             @"\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\" +
                             @".)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$";
      System.Text.RegularExpressions.Regex emailRegex =
        new System.Text.RegularExpressions.Regex(emailStrRegex);
      Telerik.Notifications.Newsletters.DataManager Manager =
        new Telerik.Notifications.Newsletters.DataManager();
      int Count = 0;
      int CountBad = 0;
      foreach (Telerik.Newsletters.ISubscriber subscriber in Manager.GetSubscribers())
      {
        Count++;
        if (!emailRegex.IsMatch(subscriber.Email))
        {           
           Response.Write(subscriber.Email + "<br>");
           CountBad++;
        }
      }
      Response.Write(string.Format("<p>Found {0} subscribers</p>", Count));
      Response.Write(string.Format("<p>{0} subscribers have invalid e-mail addresses</p>",
        CountBad ));
    }
    </script>

    To run this, create a new .aspx file (e.g. ~/Sitefinity/Admin/VerifySubscribers.aspx ) and copy in this code. Then point your browser to <yourdomain>/Sitefinity/Admin/VerifySubscribers.aspx. If you're not logged in yet you will be asked to do so.
    As it turns out, all our subscribers are valid.

    Looking at the event log entry, it would seem like newsletter sending was stopped because the request was aborted after taking too long. From the database I noticed there were 111 messages sent. The default executionTimeout is 110 seconds and the send interval is 1 second so that would add up nicely. We've increased the executionTimeout and reduced the sending interval to 0,5 seconds.

    With these settings we were able to send out the rest of the newsletter.

    I'm not sure though why we should increase the maxRequestLength setting. This setting limits the amount of data a browser can send to the server. What does that have to do with sending e-mails?

    Thanks,
    Marnix
  7. Bachar Zeidan
    Bachar Zeidan avatar
    67 posts
    Registered:
    01 Jul 2010
    21 Apr 2011
    Link to this post
    Hi,
    i need to send newsletters to (about) 10.000 subscriber at the same time.

    I set SendingInterval="1000" and executionTimeout="14400" (4h), but I need more time to complete the operation, because viewing the smtp server logs I think that (empirically) the performances are below 1 mail per second.

    I can extend the executionTimeout at 6h or more without problems? What other parameters should I check to ensure that the process does not block?
    Thank you,
    Bachar
  8. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    21 Apr 2011
    Link to this post
    Hello Bachar ,

    Have you increased the maxRequestLength? You should better split the users to two groups by 5000 users.

    Greetings,
    Ivan Dimitrov
    the Telerik team

  9. Bachar Zeidan
    Bachar Zeidan avatar
    67 posts
    Registered:
    01 Jul 2010
    26 Apr 2011
    Link to this post
    Yes, It's set to 51200 Kb.
    There's no way to obtain an unique sending?

    Best regards,
  10. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    26 Apr 2011
    Link to this post
    Hi Bachar,

    If you reach some limits and get Request timed out the proper way is to split the users, so the server will not get down.

    Kind regards,
    Ivan Dimitrov
    the Telerik team

  11. Bachar Zeidan
    Bachar Zeidan avatar
    67 posts
    Registered:
    01 Jul 2010
    28 Apr 2011
    Link to this post
    Ok, thank you
  12. Joseph
    Joseph avatar
    11 posts
    Registered:
    03 Aug 2010
    10 Aug 2011
    Link to this post
    Hi,

    Set <compilation debug="true" in the Web.config. Go through your subscriber list and make sure there are no blank e-mails or invalid ones. If you are getting the time out error in the event log, then the debug="true" should solve it.
Register for webinar
12 posts, 0 answered