Profiling a Perl CGI script that times-out

Viewed 676

I have a Perl CGI application that sometimes times out, causing it to be killed by Apache and 504 Gateway Time-out error to be sent to browser. I am trying to profile this application using NYTProf, however I cannot read profile data:

 $ nytprofhtml -f www/cgi-local/nytprof.out
Reading www/cgi-local/nytprof.out
Profile data incomplete, inflate error -5 ((null)) at end of input file, perhaps the process didn't exit cleanly or the file has been truncated  (refer to TROUBLESHOOTING in the documentation)

I am using sigexit=1 NYTProf option. Here's minimal CGI script that reproduces problem:

#!/usr/bin/perl -d:NYTProf

sleep 1 while 1;
2 Answers
Related