Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 15th, 2007, 12:47 PM
Registered User
 
Join Date: Mar 2007
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Script taking too long

This is causing the buffer limit to exeed I believe or something. Either way, I'll explain what's happening and hope someone can help.

I've written a mass email page, it allows my administrator to email everyone on the database in one go, looping through the recordset to send each email out one at a time. This is working fine, but upon talking to my server admin there is a risk of being blacklisted if more than 120 emails are sent out in a minute.

As this is the case, I needed to slow the script down (I timed it and it took less than 15 seconds to email 55 people) and thought an easy way would be to delay it by a a second every email, meaning it could never send out more than 60 in a minute. I changed script time out to 300 seconds to stop it timing out and flush the page at the top to display a loading screen.

The problem I now have, is it takes absolutely ages instead, definately too long - it was 3 minutes before I gave up and it had only delivered 30 of the emails. Can anyone help me sort this delay out to stop it sending more than 120 emails in a minute.

My idea was the following, but for some reason this doesn't work correctly and slows it down more than it should.

If intTurn = 1 Then
intTurn = 0
Do Until Second(now) = Second(now)+1
' Wait
Loop
End If

Reply With Quote
  #2 (permalink)  
Old April 15th, 2007, 06:12 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

I have never heard of this blacklist rule. Exactley who is going to blacklist you? Network administrators dont commonly have mush of a sense of humor, are you sure your one hasnt developed one?

Wind is your friend
Matt
Reply With Quote
  #3 (permalink)  
Old April 16th, 2007, 04:05 AM
Registered User
 
Join Date: Mar 2007
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm on a shared hosting environment and as a mean of protecting themselves from spam abusers the host has put in place bulk email limits. Anything more than 120 emails a minute gets my domain name blacklisted on there and I can no longer send out/recieve emails (the smtp is open for out and in usage)


Even if i wasn't to be blacklisted, it'd be interesting to know if there was a way to delay a script every x records without reverting to a resource intensive loop - just to further knowledge
Reply With Quote
  #4 (permalink)  
Old April 16th, 2007, 06:56 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

If I may, my 2cents worth:

Everyones has high hopes for thier business systems. Alot of end users what mail, newsletters and the like. This rule is very restricting if you want a high volume, in, and outgoing infomative web site. Personally I would change to a more business like solution. You have to think, what other restictions do they have in place, or wil thay put in place in the future.

Anyhow - The second part of this article looks like what you are after:
http://www.4guysfromrolla.com/webtech/012101-1.shtml

Wind is your friend
Matt
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Long Long int to bin walid C# 0 January 23rd, 2007 12:47 PM
Use of long long int jvanp C# 2005 2 September 20th, 2006 06:07 PM
Script timeout (processing long loops) tsimsha Classic ASP Basics 2 January 5th, 2005 03:31 AM
string to "long long" without using atoll sarraju C++ Programming 2 August 4th, 2004 07:19 AM
Modifying long text in a long field sajsal Classic ASP Databases 1 February 20th, 2004 12:36 PM



All times are GMT -4. The time now is 09:21 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.