lintunen has asked for the wisdom of the Perl Monks concerning the following question:

I noticed a problem a while back with a proprietary app that runs on a server I look after where web pages would get cut off during loading. So I started messing around with a bit of Perl code myself and noticed the same problem: When reading from a file the output would get cut off. There doesn't seem to be a particular point where it gets cut off, it can be quite random. Any suggestions as to why CGI Perl scripts would fail to load an entire page?

Replies are listed 'Best First'.
Re: HTML page loading 'cut off'
by marto (Cardinal) on Jul 28, 2009 at 10:33 UTC

    Is there anthing helpful in the web server log files? Perhaps if you provide an example script which reproduces the problem (please give details of any input data your script uses) someone would be able to provide more constructive help.

    There are some tutorials on CGI Programming which may be of interest, for example the Debugging setion of Ovid's CGI Course.

    Martin

      Already checked the logs: Nothing helpful. As I mentioned previously I discovered the problem using a proprietary application and creating my own script just confirmed there was an issue with large files getting cut off which perhaps suggests there is a problem with the environment. I followed the sample on this page: http://www.perlfect.com/articles/perlfile.shtml for reading in a large file line-by-line. I don't believe it's a problem with the data file itself - I have tried changing the input data used and the problem is reproducible and also, as I mentioned previously the point at which the file gets cut of seems arbitrary (it's not always the same place in the file).
        sounds like server timeout