Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Newsletter mailing timeout

  1. #1
    Join Date
    Feb 2006
    Location
    London and Galway
    Posts
    43
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Newsletter mailing timeout

    Hi All,

    Some time ago I developed an ASP newsletter application for a client, where their administrator can mail subscribers (yes there is an unsubscribe link and and they are all genuine subscribers). Anyway, when the list was small it all worked fine. Now that we have got to 500+ subscribers Im starting to get a time out message - most of the mails go out but the latest at the bottom of the list dont make it.

    Active Server Pages error 'ASP 0113'
    Script timed out
    /subscribers/broadcast.mail.asp
    The maximum amount of time for a script to execute was exceeded. You can change this limit by specifying a new value for the property Server.ScriptTimeout or by changing the value in the IIS administration tools.

    Any ideas on how to overcome this issue?

    Cheers,
    John

  2. #2
    Join Date
    Mar 2005
    Location
    Isle of Man
    Posts
    1,261
    Thanks
    3
    Thanked 24 Times in 24 Posts

    Default

    Quote Originally Posted by E-levation
    Hi All,

    Some time ago I developed an ASP newsletter application for a client, where their administrator can mail subscribers (yes there is an unsubscribe link and and they are all genuine subscribers). Anyway, when the list was small it all worked fine. Now that we have got to 500+ subscribers Im starting to get a time out message - most of the mails go out but the latest at the bottom of the list dont make it.

    Active Server Pages error 'ASP 0113'
    Script timed out
    /subscribers/broadcast.mail.asp
    The maximum amount of time for a script to execute was exceeded. You can change this limit by specifying a new value for the property Server.ScriptTimeout or by changing the value in the IIS administration tools.

    Any ideas on how to overcome this issue?

    Cheers,
    John
    You could try making the script break the emailing up into smaller chunks, sending just a few hundred each time.

  3. #3
    Join Date
    Oct 2005
    Location
    Scotland
    Posts
    229
    Thanks
    7
    Thanked 12 Times in 8 Posts

    Default

    Try adding a script timeout at the top of the page by adding this line:

    Code:
    Server.ScriptTimeout = 100
    100 = 100 Seconds so you'll probably want to increase this but that should hopefully stop it timing out. Remember though that a number of emails will have already been sent when the origional timeout happened so if it's resent some subscribers will recieve it twice.

  4. #4
    Join Date
    Apr 2005
    Location
    Bucks. UK
    Posts
    223
    Thanks
    1
    Thanked 6 Times in 6 Posts

    Default

    Hi John,

    Have you tried using the mail queue facility of aspemail, assuming that's what you're using?
    AspEmail 5.0 offers the flag Mail.Queue which, if set to True, instructs the Send method to place a message in a queue and return immediately, without opening an SMTP session. Your message-sending ASP script no longer has to wait until a message is sent, which means a better client-response time and less load on IIS.
    Code:
    <% 
    Set Mail = Server.CreateObject("Persits.MailSender") 
    Mail.Host = "localhost" 
    Mail.From = "TESTCODE@yourdomain.co.uk" 
    Mail.Fromname = "FROM NAME HERE" 
    Mail.AddAddress "TEST@yourdomain.co.uk" 
    Mail.Subject = "SUBJECT TEXT HERE" 
    Mail.Body = "BODY TEXT HERE" 
    
    Mail.Queue = TRUE 
    Mail.Send 
    %>
    Setting Queue = True is the only real difference the manual is here http://www.aspemail.com/manual_07.html

    Regards
    Keith.

  5. #5
    Join Date
    Oct 2005
    Posts
    256
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Queue Makes plenty more sense. I wish I'd known that existed sooner (rather than delving into MSMQ and writing a windows service to fart out the spam).

    You don't want to EVER rely on scripttimeout as this can be (and should be!!) overridden on the web server configuration. Not only that, the browser may have a timeout which drops the http connection (which will mess up your script too).

  6. #6
    Join Date
    Feb 2004
    Posts
    4,903
    Thanks
    2
    Thanked 134 Times in 113 Posts

    Default

    The best way to do this is with chunks, where your script automatically makes an HTTP refresh:

    http://www.mydomain.com/sendmail.asp?startfrom=1

    redirects to

    http://www.mydomain.com/sendmail.asp?startfrom=100

    redirects to

    http://www.mydomain.com/sendmail.asp?startfrom=200

    etc...

    By the way - I hope whatever you are emailing is legit.
    Warren Ashcroft
    Red Fox UK Limited - Pioneers in Internet Technology
    http://www.redfoxuk.com
    w.ashcroft [at] redfoxuk.com

    NOTE: Forum Private Messaging should not be used to contact staff with support queries.

  7. #7
    Join Date
    Feb 2006
    Location
    London and Galway
    Posts
    43
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Thanks for all your suggestions

    Hi All,

    Thanks for all your suggestions over the day. I think I will try the Mail.Queue = TRUE in the short term and test it out, then when I get a bit more time later in the week I will try breaking it up into chunks.

    For the record my mailings are legit all right, they go out to conference delegates who will be attending conferences on important matters of the day such as Waste Water Management, letting them know who the latest speakers will be etc ("Ive been in waste water for 20 years and ill tell yiz all about it" sort of thing), about once or twice a month. Oh perhaps one day Ill get the latest MTV2, BMW or better still a new playboy site to work on....until then..its back to waste water....

  8. #8
    Join Date
    Jun 2005
    Posts
    79
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    Good luck. Have been trying it on the RF servers - never got it to work. Unforunately, it seems that the professional version of ASPEmail is not installed?

    Might be cheaper to actually buy the Professional version of W3Jmail.

    SG

  9. #9
    Join Date
    Apr 2005
    Location
    Bucks. UK
    Posts
    223
    Thanks
    1
    Thanked 6 Times in 6 Posts

    Default

    I did test the script above before I posted it so as far as I'm concerned the queue feature works on Carbon.

    Regards
    Keith.

  10. #10
    Join Date
    Jun 2005
    Location
    Basingstoke, Hampshire
    Posts
    127
    Thanks
    1
    Thanked 4 Times in 2 Posts

    Default

    I had this problem with a PHP mailing system a couple of years ago, and got round it using the same method Warren suggested with HTTP refreshes and querystrings. Never had a problem with it since (it regularly mails 1200 people)... until I just tried it with IE7 beta...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Asp.net session timeout
    By kbi911 in forum ASP.NET
    Replies: 3
    Last Post: 14th February 2006, 01:39 PM
  2. Mailing Question
    By Breaks in forum Technical Support
    Replies: 2
    Last Post: 30th August 2005, 07:22 PM
  3. Mailing Lists
    By Sol in forum Sales and Service Feature Enquiries
    Replies: 3
    Last Post: 7th July 2005, 03:31 PM
  4. Mailing list in ASP or PHP
    By Jaro in forum Web Applications and Scripts
    Replies: 6
    Last Post: 30th June 2005, 02:19 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •