Unfortunatly it does not work:$mech->repl->repl->timeout(100000);
$mech->repl->repl->setup_client( { extra_client_args => { timeout => 1 +80 } } );
But I wonder - WWW::Mechanize::Firefox polls for results from Firefox, so there should be no timeout even if a website is slow to respond. The main cause I know for getting timeout errors is when I send invalid Javascript code over to Firefox.Last commands before timeout which I can see with strace:
write(3, "JSON.stringify( function(){ var res = repl.getAttr(17,\"busy +\")\n; return { result: res }}())\n", 91) = 91 select(8, [3], NULL, NULL, {11, 0}) = 1 (in [3], left {10, 999993} +) read(3, "\"{\"result\":{\"result\":0,\"type\":null}}\"\n", 4096) = 38 select(8, [3], NULL, NULL, {11, 0}) = 1 (in [3], left {10, 964561} +) read(3, "repl> ", 4096) = 6 select(8, NULL, [3], NULL, {11, 0}) = 1 (out [3], left {10, 999993 +}) write(3, "JSON.stringify( function(){ var res = repl.getAttr(17,\"busy +\")\n; return { result: res }}())\n", 91) = 91 select(8, [3], NULL, NULL, {11, 0}) = 1 (in [3], left {10, 997753} +) read(3, "\"{\"result\":{\"result\":0,\"type\":null}}\"\nrepl> ", 4096) + = 44 select(8, NULL, [3], NULL, {11, 0}) = 1 (out [3], left {10, 999993 +}) write(3, "JSON.stringify( function(){ var res = repl.getAttr(17,\"busy +\")\n; return { result: res }}())\n", 91) = 91 select(8, [3], NULL, NULL, {11, 0}) = 1 (in [3], left {10, 997763} +) read(3, "\"{\"result\":{\"result\":0,\"type\":null}}\"\nrepl> ", 4096) + = 44 select(8, NULL, [3], NULL, {11, 0}) = 1 (out [3], left {10, 999992 +}) write(3, "JSON.stringify( function(){ var res = repl.getAttr(17,\"busy +\")\n; return { result: res }}())\n", 91) = 91 select(8, [3], NULL, NULL, {11, 0}) = 1 (in [3], left {10, 998085} +) read(3, "\"{\"result\":{\"result\":0,\"type\":null}}\"\nrepl> ", 4096) + = 44 select(8, NULL, [3], NULL, {11, 0}) = 1 (out [3], left {10, 999992 +}) write(3, "JSON.stringify( function(){ var res = repl.getAttr(17,\"busy +\")\n; return { result: res }}())\n", 91) = 91 select(8, [3], NULL, NULL, {11, 0}) = 1 (in [3], left {10, 997690} +) read(3, "\"{\"result\":{\"result\":0,\"type\":null}}\"\n", 4096) = 38 select(8, [3], NULL, NULL, {11, 0}) = 1 (in [3], left {10, 960641} +) read(3, "repl> ", 4096) = 6 select(8, NULL, [3], NULL, {11, 0}) = 1 (out [3], left {10, 999992 +}) write(3, "JSON.stringify( function(){ var res = repl.getAttr(17,\"busy +\")\n; return { result: res }}())\n", 91) = 91 select(8, [3], NULL, NULL, {11, 0}) = 1 (in [3], left {10, 997790} +) read(3, "\"{\"result\":{\"result\":0,\"type\":null}}\"\nrepl> ", 4096) + = 44 select(8, NULL, [3], NULL, {11, 0}) = 1 (out [3], left {10, 999993 +}) write(3, "JSON.stringify( function(){ var res = repl.getAttr(17,\"busy +\")\n; return { result: res }}())\n", 91) = 91 select(8, [3], NULL, NULL, {11, 0}) = 1 (in [3], left {10, 997765} +) read(3, "\"{\"result\":{\"result\":0,\"type\":null}}\"\nrepl> ", 4096) + = 44 select(8, NULL, [3], NULL, {11, 0}) = 1 (out [3], left {10, 999993 +}) write(3, "JSON.stringify( function(){ var res = repl.getAttr(17,\"busy +\")\n; return { result: res }}())\n", 91) = 91 select(8, [3], NULL, NULL, {11, 0}) = 1 (in [3], left {10, 997764} +) read(3, "\"{\"result\":{\"result\":0,\"type\":null}}\"\nrepl> ", 4096) + = 44 select(8, NULL, [3], NULL, {11, 0}) = 1 (out [3], left {10, 999993 +}) write(3, "JSON.stringify( function(){ var res = repl.getAttr(17,\"busy +\")\n; return { result: res }}())\n", 91) = 91 select(8, [3], NULL, NULL, {11, 0}) = 1 (in [3], left {10, 997768} +) read(3, "\"{\"result\":{\"result\":0,\"type\":null}}\"\nrepl> ", 4096) + = 44 select(8, NULL, [3], NULL, {11, 0}) = 1 (out [3], left {10, 999992 +}) write(3, "JSON.stringify( function(){ var res = repl.getAttr(17,\"busy +\")\n; return { result: res }}())\n", 91) = 91 select(8, [3], NULL, NULL, {11, 0}) = 1 (in [3], left {10, 999993} +) read(3, "\"{\"result\":{\"result\":0,\"type\":null}}\"\nrepl> ", 4096) + = 44 select(8, NULL, [3], NULL, {11, 0}) = 1 (out [3], left {10, 999993 +}) write(3, "JSON.stringify( function(){ var res = repl.getAttr(17,\"busy +\")\n; return { result: res }}())\n", 91) = 91 select(8, [3], NULL, NULL, {11, 0}) = 1 (in [3], left {10, 997789} +) read(3, "\"{\"result\":{\"result\":0,\"type\":null}}\"\nrepl> ", 4096) + = 44 select(8, NULL, [3], NULL, {11, 0}) = 1 (out [3], left {10, 999992 +}) write(3, "JSON.stringify( function(){ var res = repl.getAttr(17,\"busy +\")\n; return { result: res }}())\n", 91) = 91 select(8, [3], NULL, NULL, {11, 0}) = 1 (in [3], left {10, 996842} +) read(3, "\"{\"result\":{\"result\":0,\"type\":null}}\"\nrepl> ", 4096) + = 44 select(8, NULL, [3], NULL, {11, 0}) = 1 (out [3], left {10, 999993 +}) write(3, "JSON.stringify( function(){ var res = repl.getAttr(17,\"busy +\")\n; return { result: res }}())\n", 91) = 91 select(8, [3], NULL, NULL, {11, 0}) = 1 (in [3], left {10, 997698} +) read(3, "\"{\"result\":{\"result\":0,\"type\":null}}\"\n", 4096) = 38 select(8, [3], NULL, NULL, {11, 0}) = 1 (in [3], left {10, 960724} +) read(3, "repl> ", 4096) = 6 select(8, NULL, [3], NULL, {11, 0}) = 1 (out [3], left {10, 999993 +}) write(3, "JSON.stringify( function(){ var res = repl.getAttr(17,\"busy +\")\n; return { result: res }}())\n", 91) = 91 select(8, [3], NULL, NULL, {11, 0}) = 0 (Timeout) write(2, "command timed-out at /usr/local/share/perl/5.10.1/MozRepl/Cl +ient.pm line 186\n", 77) = 77
In reply to Re^2: WWW::Mechanize::Firefox and Net::Telnet timeout
by OlegG
in thread WWW::Mechanize::Firefox and Net::Telnet timeout
by OlegG
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |