cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
msharp
Super User (Alumni)

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?

2 REPLIES 2
Craige_Hales
Super User

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>

Craige
landon
Super User (Alumni)

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.

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