Hi.

It sounds like what you need to do is :
add some logging directly in your perl script, to a separate logfile.
(And maybe re-open STDERR to that same logfile).
Then you will see exactly where and why the perl script crashes under Apache.
Do not forget that when the perl script runs under Apache, it runs under the same user-id as the Apache webserver.

On 22.05.2017 12:40, ST Wong (ITSC) wrote:
Hi, I’ve a Perl script that does following:

-Ssh to a device and get information, e.g.:  open(DEV, “/usr/bin/ssh -v
statuser\@192.168.11.1 sh get client list| ");

-Loop through the result and display as html.

The Perl script can complete without problem when run in bash or in Apache 2.2.

However, when I put it on a new Apache 2.4 server, the script can’t display all 
output –
the output table expected to be 1000 lines now ends at ~300.   Checked that it 
seems the
ssh command terminated prematurely.  The “while (<DEV>)” loop exists as there 
is no more
input data.   The Perl can also complete without problem when run in bash on 
the same
server running Apache 2.4.

I wonder if there is any resource limit for CGI/Perl when running under Apache 
2.4.
   Default OS resource limit looks alright:

stack size              (kbytes, -s) 8192

cpu time               (seconds, -t) unlimited

max user processes              (-u) 15014

virtual memory          (kbytes, -v) unlimited

Sorry that I’m not web admin and don’t have access to Apache logs.

Would anyone please help?   Thanks a lot.

Regards


Reply via email to