Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llHttpRequest throttling not accurate?

Geuis Dassin
Filming Path creator
Join date: 3 May 2006
Posts: 565
05-30-2006 08:23
The wiki http://secondlife.com/badgeo/wakka.php?wakka=llHTTPRequest says:

"HTTP requests made using llHTTPRequest are throttled based on the script owner and region. Requests are throttled to a maximum of 20 requests per 100 seconds."

In experimenting with this in the last 2 days, it seems this might be inaccurate, despite what others have reported.

I have set the timer on my script to 5, 6, and even 10 second intervals between each llHTTPRequest. While I have not tried intervals longer than this, it seems that even at 10 second intervals with only 1 object running that has the script, its still throttling after an uncertain number of requests have been reached.

Has anyone else run into this also?

(edit)

Here is the script I am currently using.

CODE

integer timerOn = 0; // set "on" flag to 0 (on)
default
{
touch_start(integer total_number)
{
if(timerOn == 0)
{
timerOn = 1;
llSay(0,"Starting Tracking");
llSetTimerEvent(10);
}else{
timerOn = 0;
llSay(0,"Stopping Tracking");
llSetTimerEvent(0);
}

}

timer()
{
llSay(0,"Tracking...");

if(llHTTPRequest("http://URLREMOVEDFORSECURITY",[HTTP_METHOD,"POST"],"")==NULL_KEY){
llSay(0,"HTTP throttle reached");
}
}


http_response(key request_id, integer status, list metadata, string body)
{
llSay(0,body);
}
}


The timer is currently set to 10 seconds.

I ran this several times, leaving several minutes between each run to clear out the throttle buffer.
1st run: ran 4 times before throttle was reached
2nd run: 3 times
3rd run: 3 times

There's a bug here, unless someone can pinpoint the error in my code.
Geuis Dassin
Filming Path creator
Join date: 3 May 2006
Posts: 565
05-30-2006 09:57
I experimented with this more, and it appears that if I teleport to another sim, it doesnt throttle after 3 requests.

However, after I teleported back into the original sim and tried to run the script again, it throttled out right after 3 requests.

It seems that this sim isn't clearing the throttle limit.

The sim I'm in, Innovation Island.
Champie Jack
Registered User
Join date: 6 Dec 2003
Posts: 1,156
05-30-2006 10:47
Here is an official Linden response from Kelly Linden

From: Kelly Linden
Short answer: If all objects you own in the sim stop making requests completely, the throttle will completely clear in 200 seconds.

Medium answer: You can start making requests again sooner, however you may also hit the throttle sooner.

Long answer: The throttle uses a moving window to continue to block things that don't slow down. Starting with the first request, requests are counted in 100 second buckets. For 100 seconds from the first request all requests go into a single bucket, 100 seconds later a new bucket is started ... but the last bucket is kept around. If the current bucket has more than the throttle limit (20) then requests will be blocked. If the current total + (% of time remaining in this bucket * total from last bucket) is more than the throttle (20) then requests are blocked.

Simple eh?

So, you don't want to do while(key!=null) loops because you will just hit the throttle quick then be blocked. I would recomend just spacing out each request at least 5 seconds, or if bursts are needed then spacing 5*(requests / burst) seconds.
Geuis Dassin
Filming Path creator
Join date: 3 May 2006
Posts: 565
05-30-2006 10:55
No, this isn't the answer. I've read this.

This is a case where I'm waiting now 30 minutes between each attempt to run the script. The time no longer matters. As soon as it starts running, within 3 requests I get the throttle limit. I'm still looking into this.
Geuis Dassin
Filming Path creator
Join date: 3 May 2006
Posts: 565
05-30-2006 11:13
Ok, I found there was an early version of the same object that had escape my detection that had been running the entire time. So as of now I deleted it and it appears to be working correctly.

However, there is still the time limit concern.
SiRiS Asturias
Chaotic Coder
Join date: 27 Sep 2005
Posts: 93
I agree...
06-12-2006 07:07
At the below link I have found the same:

http://forums.secondlife.com/showth...764#post1068764
_____________________
Proud founder of:
S3 - Self Storage Systems
S3storage.net (Coming Soon!)

SLBoutique.com
SLExchange.com - Find What You Need, When You Need It.

"Light travels faster than sound. This is why some people appear bright, until you hear them speak."