Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mod_perl causing script looping

Status
Not open for further replies.

csgonan

MIS
May 2, 2007
118
US
On a solaris 8 server with Apache 2.6 and perl 5.8.8, we have an html/javascript file that uses HTTP Post to a perl script. The perl script sends data back via HTTP get to a redirected HTML file. The HTML file strips off data from the command line of the URL (suff after the "?") and then posts more data to the perl script until all of the data it needs is retreived. This works fine in perl without mod-perl enabled, but loops in modperl, as if the initial connection for the first request is still open and the same data is being endlessly sent back. This happens on later versions of Solaris as well.

We did find that after what seems like many interations of the looping, the data finally get processed and the subsequent screen appears, but that is after a minute at least. When not using mod_perl, this doesn't happen. The developer wanted to put in a "wait" type command to see if that worked, but it did not make a difference.

Has anyone seen this type of behavior?

Thank you very much
 
No real solutions - just suggestions at this point. Historically when I run into issues of this venue, getting real anal on any global/local vars tends to clean things up.

- Verify any global and local variables are what you want them to be at the end of any loop. Set them to "", 0, undef, or delete them if you can. This applies to variables passed by reference as well.
- If you're using methods ($m), see if there are any $m->close() type calls that can (should) be made
- ** VERIFY THAT ANY 'CLOSE' TYPE ACTIONS SUCCEEDED **
Example
Code:
 close(FH) || print "Close failed" ;
The above idea can be applied to $m->close() type actions as well.

The basic mind set is to determine what within your computing memory scope has changed since start-up. What can you do to (safely) change it back to an initial state.
 
Another thought came to mind - be mindful of any default variables you may be using eg
Code:
foreach (@arr_var) { print }
I see them used frequently in this forum. While they come in handy, they can also be invisible nightmares when you least expect it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top