- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Open() Time Out Error
I have a script that runs: text =Open(URL); and it works fine for the majority of all cases. The URL is a link to a python script that returns data in comma delineated text format. The problem I'm facing is every now and then the python script may take a while and the open() times out in JSL. I get the error:
"Unable to read data from URL:
Internet Error: 12002 (The operation timed out)"
When heading to the URL in a browser the data returns just fine. Is there anyway to manipulate the JSL timeout parameter?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Open() Time Out Error
I wrote a small PHP script to test this, but I'm not sure I'm testing the right thing. It delivers a small amount of data, once a second, without breaking the connection, forever. It ran 2500 seconds before I disconnected the ethernet to see the results:
open("http://ExampleNotReallyHere.com/forever.php")
"<!DOCTYPE html>
<html>
<body>
<br>10000000 10000001 10000002 10000003 10000004 ... 10002518 10002519 <br>10002520 "
here's the PHP:
<!DOCTYPE html>
<html>
<body>
<?php
for($i=10000000;$i<99999999;$i++) {
if( ( $i % 20 ) == 0 ) {
echo "<br>";
}
echo "$i ";
flush();
ob_flush();
sleep(1);
}
?>
</body>
</html>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Open() Time Out Error
We got a similar 'Internet Error: 12002 (The operation timed out)' message trying to use a REST API... and we ended up having to modify the registry. We were getting timeouts after ~30 seconds.
We used some of these references in our troubleshooting.
- WINHTTP_OPTION_RECEIVE_TIMEOUT section of (Option Flags (Windows)).
- WinINet API section of (https://support.microsoft.com/en-us/kb/181050).
We ended up modifying the registry (with JSL) to extend the timeout... see my post at Re: Calling RESTful Web Services from JMP
Regards, -Landon