PDA

View Full Version : Trouble with WebGet (Perl)


skyliner
04-19-1999, 09:52 PM
Hello,

I've just tried to do some testing with Jeffrey Friedl's webget.pl (fetches files from remote hosts). It works perfectly on several other sites of mine (some of them are run on Linux, others on BSDI); however, it completely refused to operate on my accout at the SIX server with FutureQuest (balticmarkets.com domain). The error message it produces is:

Prototype mismatch: sub main::__need_size_t vs () at (eval 48) line 1.
Deep recursion on subroutine "main::SOCK_STREAM" at (eval 50) line 1.
Out of memory during "large" request for 2101248 bytes at (eval 50) line 1.

I understand it runs out of memory, which is rather strange, as I've been testing it with small HTML pages (<30kb).

The script itself is identical to those I successfuly run on, for instance, Tabnet servers. File transferred in ASCII mode.

I would appreciate any kind of help as I can't find any solution myself.

Thanks in advance.

Skyliner

Terra
04-21-1999, 12:03 AM
Is this script compatible with Perl 5.005_02?

Is this script an XS script (needs to be compiled)...

You can check your limits (if running script from command line) by typing "$ulimit -a"...

We do have some controls in place to stop excessive resource usage from both the command line and Apache CGI...

Personally, I have always just used the LWP perl library for stuff like this...

I do know that all XS based perl scripts/modules must be recompiled as SIX is running Linux 2.2.5 and Perl 5.005_02...

What concerns me is the 'deep recursion', it appears that something is going haywire in the low level socket interface... It should not be spinning recursively in there...

Check the mailing lists as well for any reported problems with webget.pl, and also it's homepage...

I have used webget.pl successfully on my home system, and on TAZ - but have never had the need for it on SIX as I converted it all to LWP...

--
Terra
sysAdmin
FutureQuest

skyliner
04-21-1999, 07:14 AM
Terra,

Thanks for guidance.

I still don't have an idea what prevents webget from working correctly, as it is not an XS script (whatever that is http://www.aota.net/ubb/smile.gif ) and works ok both with Perl4 and Perl5 on other servers.

...But the real solution turned out to be LWP. It's a shame I haven't used it before. A simple two- liner does exactly what I need; eliminating the need to pipe anything through external script (as it was the case with webget) as a bonus. Probably will stumble into some or other problems as the scripts develop, but at this point the LWP solution seems perfect.

Thanks again, your support is invaluable.

Skyliner