Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llHTTPRequest and Timeouts

Kris Seoung
Registered User
Join date: 27 Aug 2008
Posts: 7
05-01-2009 18:41
Before I get into testing, I'd like to simulate a Push server, so I can avoid XML-RPC, and as a stopgap until llRequestURL is in production. I think a valid solution would be to create a HTTP request, and have it sleep server side until an event arrives, then send the event. Now in PHP there is a way to tell if the connection was aborted, but that largely is a function of user-agent honesty, as relying on an RSET is laggy and well, it does not always arrive before you're finished processing. The documents specify the LSL timeout for a request is 60 seconds and at this point, does the simulator disconnect properly, or silently drop?

I suppose, what I'm asking is, is SecondLife's HTTP requesting well behaved, if not, I could write around it, but it would not be pretty... and I love pretty code :)

Thank you in advance, Kris Seoung.
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
05-01-2009 19:13
none of the wiki's say, never used it enough to know.
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Kris Seoung
Registered User
Join date: 27 Aug 2008
Posts: 7
05-01-2009 19:16
Yeah, I've found the wiki's and even the design documents to be lacking little, crucial pieces of information that would be really helpful to build reliable systems.
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
05-01-2009 19:40
should be testable, just have the php forcibly wait 75 seconds, and report the result of the waiting =)
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Kris Seoung
Registered User
Join date: 27 Aug 2008
Posts: 7
05-01-2009 19:50
I'm more concerned with that the PHP script sees, and, as I'm using a shared host to do my debugging, looking at the raw error logs, or even tcpdumping is not an option, so I'd be relegated to well, possibly writing everything to disk and tailing it... I was really just wondering if anyone had done anything similar, and what the reliability was?

I can afford a few, perhaps 1/1000th of the requests to be lost or not pushed, but any more than that and well, I'd need to build in additional mechanisms... they take time, money, and bandwidth (more money).
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
05-01-2009 20:03
can you modify or add a .htaccess file to provide you with a simpler more specific log? that'd at least save you running through the the raw log, and shouldn't mess with anybody else on the server. is there a way within the php script to detect a proper disconnect? I haven't delved that deeply so I dunno. if so just have the php post a message or set and environment variable if it detects the drop early, and a different value if it hit's the full time past the known timeout.
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Kris Seoung
Registered User
Join date: 27 Aug 2008
Posts: 7
05-01-2009 20:11
For posterity, there are no logging options that can be built into .htaccess reliably. All of the Log directives require either vhost or httpd.conf level options, due to the structure of apache.

I think I'll just set up a A/CNAME alias to my home connection once the DSL comes back online, and post my results so other people aren't scratching their heads, as I am right now.

I can't see doing a reliable test using my phone as a modem, and I don't reallly even see using my DSL connection as a valid test suite, but it is better than LSL documentation I suppose.

Thanks for the ideas though, and you're on my fav list, just in case you needed a little e-couragement.
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
05-01-2009 23:20
compliment appreciated. and you're right I forgot how hacky it was to enable them for .htaccess (ive seen passed variables and vhost subbing on the newer builds, and there's a modulue too, none of which help if they aren't set up in advance and you can't take down the server to change it over.) sry 'bout that... been a little bit since I played with it. (old machine is being rebuilt, site lost to disk crash, meh) let us know, I can see it being useful info for other reasons
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -