Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008764opensim[REGION] Script Functionspublic2020-09-07 07:052020-09-07 08:48
ReporterJeffKelley 
Assigned ToBillBlight 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0008764: http_response lost when chaining llHTTPRequest
DescriptionWnen chaining http requests (i.e. performing it immediately after the previous response) the http_response is sometimes lost.

It does not matter if the requests are to the same or different hosts/urls. The issue was discovered when polling an assortment of servers, but the repro is shorter with a single one.

The issue exists in current master 2020-09-06-649e447
The issue exists in release 0.9.1.1
The issue DOES NOT exist in release 0.9.0.0

XEngine
Steps To Reproducekey sendRequest (string url) {
    return llHTTPRequest(url,
        [
            HTTP_METHOD, "GET",
            HTTP_BODY_MAXLENGTH, 16384
        ], "");
}


integer iterations;
string gURL = "http://hg.osgrid.org:80"; [^]
key gKey;


NextQuery() {
    if (--iterations < 0) {
        llOwnerSay ("Finished"); return;
    }
    gKey = sendRequest (gURL);
    llSetTimerEvent(5.0);
}


default {

    touch_start (integer n) {
        iterations = 40;
        NextQuery();
    }

    http_response(key id,integer status, list meta, string body) {
        if (id != gKey) llOwnerSay ("Sequence error");
        llSetTimerEvent(0.0);
        integer body_length = llStringLength(body);
        llOwnerSay ((string)["HTTP ", status, ", ", body_length, " bytes"]);
        NextQuery();
    }

    timer() {
        llSetTimerEvent(0.0);
        llOwnerSay (" TIMEOUT, RETRYING");
        NextQuery();
    }

}
Additional InformationIn this log, it appears to happen one over 5 requests, but this is not necessarily the case. It depends on content length, although there is no clear pattern.

[06:50] MANTIS 8764: HTTP 200, 0 bytes
[06:50] MANTIS 8764: HTTP 200, 0 bytes
[06:50] MANTIS 8764: HTTP 200, 0 bytes
[06:50] MANTIS 8764: HTTP 200, 0 bytes
[06:50] MANTIS 8764: HTTP 200, 0 bytes
[06:50] MANTIS 8764: TIMEOUT, RETRYING
[06:50] MANTIS 8764: HTTP 200, 0 bytes
[06:50] MANTIS 8764: HTTP 200, 0 bytes
[06:50] MANTIS 8764: HTTP 200, 0 bytes
[06:50] MANTIS 8764: HTTP 200, 0 bytes
[06:50] MANTIS 8764: HTTP 200, 0 bytes
[06:50] MANTIS 8764: TIMEOUT, RETRYING
[06:50] MANTIS 8764: HTTP 200, 0 bytes
[06:50] MANTIS 8764: HTTP 200, 0 bytes
[06:50] MANTIS 8764: HTTP 200, 0 bytes
[06:50] MANTIS 8764: HTTP 200, 0 bytes
[06:50] MANTIS 8764: HTTP 200, 0 bytes
[06:50] MANTIS 8764: TIMEOUT, RETRYING
[06:50] MANTIS 8764: HTTP 200, 0 bytes
[06:50] MANTIS 8764: HTTP 200, 0 bytes
[06:50] MANTIS 8764: HTTP 200, 0 bytes
[06:50] MANTIS 8764: HTTP 200, 0 bytes
[06:50] MANTIS 8764: HTTP 200, 0 bytes
[06:50] MANTIS 8764: TIMEOUT, RETRYING
[06:50] MANTIS 8764: HTTP 200, 0 bytes
[06:50] MANTIS 8764: HTTP 200, 0 bytes
[06:50] MANTIS 8764: HTTP 200, 0 bytes
[06:50] MANTIS 8764: HTTP 200, 0 bytes
[06:50] MANTIS 8764: HTTP 200, 0 bytes
[06:51] MANTIS 8764: TIMEOUT, RETRYING
[06:51] MANTIS 8764: HTTP 200, 0 bytes
[06:51] MANTIS 8764: HTTP 200, 0 bytes
[06:51] MANTIS 8764: HTTP 200, 0 bytes
[06:51] MANTIS 8764: HTTP 200, 0 bytes
[06:51] MANTIS 8764: HTTP 200, 0 bytes
[06:51] MANTIS 8764: TIMEOUT, RETRYING
[06:51] MANTIS 8764: HTTP 200, 0 bytes
[06:51] MANTIS 8764: HTTP 200, 0 bytes
[06:51] MANTIS 8764: HTTP 200, 0 bytes
[06:51] MANTIS 8764: HTTP 200, 0 bytes
[06:51] MANTIS 8764: Finished
TagsNo tags attached.
Git Revision or version number649e447
Run Mode Grid (1 Region per Sim)
Physics EngineBulletSim
Script EngineXEngine
EnvironmentUnknown
Mono VersionNone
Viewer
Attached Files

- Relationships

-  Notes
(0036789)
djphil (reporter)
2020-09-07 07:48

Sl wiki say : "The current limits are 25 requests in 20 seconds for each object, and 1000 in 20 seconds for each owner. These may change in the future if needed to prevent problems in regions."

But that's not exactly true in Opensimulator ...
(0036790)
JeffKelley (reporter)
2020-09-07 08:01

Your guess is correct. That's an effect of throttling that was introduced with 9.1.1. Failed requests actually return NULL_KEY.
(0036791)
JeffKelley (reporter)
2020-09-07 08:32

Working as documented.
Request for closing.
See MANTIS 8765.
(0036792)
UbitUmarov (administrator)
2020-09-07 08:32

yes
you can see that adding to NextQuery()

...
    gKey = sendRequest (gURL);
    if(gKey == NULL_KEY)
        llSay(0,"thottled");
...


[08:28] Object: HTTP 200, 0 bytes
[08:28] Object: HTTP 200, 0 bytes
[08:28] Object: HTTP 200, 0 bytes
[08:28] Object: HTTP 200, 0 bytes
[08:28] Object: HTTP 200, 0 bytes
[08:28] Object: thottled
[08:28] Object: TIMEOUT, RETRYING

return of llHTTPRequest should he checked for NULL_KEY
(0036793)
BillBlight (developer)
2020-09-07 08:42

Working per spec
resolved at OP request
(0036794)
UbitUmarov (administrator)
2020-09-07 08:48

this have config options in section ScriptsHttpRequestModule

- Issue History
Date Modified Username Field Change
2020-09-07 07:05 JeffKelley New Issue
2020-09-07 07:48 djphil Note Added: 0036789
2020-09-07 08:01 JeffKelley Note Added: 0036790
2020-09-07 08:32 JeffKelley Note Added: 0036791
2020-09-07 08:32 UbitUmarov Note Added: 0036792
2020-09-07 08:42 BillBlight Note Added: 0036793
2020-09-07 08:42 BillBlight Status new => resolved
2020-09-07 08:42 BillBlight Resolution open => fixed
2020-09-07 08:42 BillBlight Assigned To => BillBlight
2020-09-07 08:48 UbitUmarov Note Added: 0036794


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker