in reply to Re: HTML::Mason and long method call
in thread HTML::Mason and long method call

Hi shmem,

The problem is not with my longfunction STDERR, or even with the mason STDERR. If inside my longfunction I print to STDERR I get the message in error_log, and the same happens when I print to STDERR after the call to this component.

My problem is that Mason seems to terminate my component and behave like everything is ok.

This component is not complemently run, but everything after its call in the caller is runned normally. My final page is created as if this component runned completly ok but didn't sent any output.

Replies are listed 'Best First'.
Re^3: HTML::Mason and long method call
by ForgotPasswordAgain (Vicar) on Oct 23, 2006 at 13:25 UTC
    Did you try to isolate where it stops printing inside of longfunction? Did you check if any error is being printed in the HTML output to the browser? (What is MasonErrorMode/error_mode?) What code is inside longfunction? Did you try the Mason mailing list? Also, looking in the MASON_DATA_ROOT at what the components get compiled into can help sometimes. What is your system (redhat?) ? What version of Mason?
      The system is a Fedora Core release 3 (Heidelberg), with Mason $HTML::Mason::VERSION = '1.34';

      The error_mode is the default and the code inside longfunction depends on the specific function, but is always calls to NET::Telnet->*, to execute commands on remote network hardware.

      The component compiles to expectable code, and works everytime the call to longfunction takes a bit less time.

      Didn't tried the Mason mailling list yet as I'm subscribed with an email I don't have configured in this computer. Gone try that later on my home computer.

      Thanks,

        Note that the default error_mode sends output to the browser:
           error_mode
               Indicates how errors are returned to the caller.  The choices are fatal, meaning die
               with the error, and output, meaning output the error just like regular output.
        
               The default under Apache and CGI is output, causing the error to be displayed in the
               browser.  The default for standalone mode is fatal.
        

        (From perldoc HTML::Mason::Request.)

        I have a dread of mod_perl under RedHat, but I haven't used it for several years so I don't know what the current status is. What you're describing sounds like something that might happen there (requests mysteriously dropped as something segfaults), though, which is why I asked.

        I'd suspect your code first, though...