in reply to Re: Re: Re: for SWIFTONE
in thread for SWIFTONE

I've displayed and compared the lines inside the loop and outside and the strings from this statement look exactly the same: $tty = qx{aml_read /l trace /h ftwaeipd0001 /a commproc /s "12/04/2000 07:00:00" /b "12/04/2000 08:00:00" /d all | egrep -c -e tty2};

I can change both statements to qq inside and outside the loop and it runs and displays the string. But as soon as I change it back to qx the one inside the loop fails....

I guess maybe I should try a different route. Is there any way I can walk through the code as it is executing and see exactly what it is doing?

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: for SWIFTONE
by swiftone (Curate) on Dec 05, 2000 at 22:06 UTC
    Is there any way I can walk through the code as it is executing and see exactly what it is doing?

    Absolutely. See Using the Perl Debugger

      Well thank you for all your help Swiftone. I'm now fairly convinced that we are experiencing some sort of timeout problem. I've gotten the code to work in and outside the loop, but for small time ranges. Plus sometimes the same query will work when it previously didn't. I think there is something wrong with our aml_read since the 4.3.3 AIX conversion that is the culprit. I will keep looking at it but thanks again for helping me.

      Bryan

        Does aml_read hit a database for data? Does the database have a no_flood option or login_limit function that prevents an out of control process from making too many connections in a short period? Does aml_read leave db connections hanging after it exits?

        I've seen this sort of a problem before. Sybase and many other DBs will freak if you hit them too fast with the same login/request. They protect themselves by dropping connections. That is why things like Apache::AUTH_DBI cache authentication lookups, a webserver can beat a DB to death just with authentication. That could explain why it works once but not in a loop.

        --
        $you = new YOU;
        honk() if $you->love(perl)