On Fri, Aug 23, 2013 at 05:14:25AM -0700, Moritz Lenz wrote: > Hi all, > > I am trying to debug a problem in a long-running process. We have a > perl-based web service (OTRS) that > runs via FastCGI, and after a few hours of heavy use, it becomes slower > and slower (like requests that > used to take 1s now take > 3s). And we don't know why, but as far as > possible we have ruled out external > factors (system load, database response times, IO response times etc.). > Restarting Apache, and thus the > FastCGI processes, resets the response time again. So I want to figure out > what's slowing it down. > > So I've added a small piece of code that switches on the profiler for > certain requests, using > > require Devel::NYTProf; > DB::enable_profile($filename); > # do the request here, and then > DB::finish_profile(); > > Now that works, in the sense that the nytprof.*.out files are written to > disc, but the HTML files > generated by nytprofhtml are mostly empty, for example > http://moritz.faui2k3.org/tmp/nytprof-b0rked/ . > You can see that this is for 10 requests (combined with nytprofmerge) for > a total of 30.8s, but the > exclusive time of all the subroutines adds up to less than half a second, > so most of the time spent in > the profile is missing, and I don't learn anything interesting from the > profile. > Another weird thing is that in the generated HTML, the subroutine links > don't seem to lead to any useful > locations, neither to the declaration nor to the calling location of that > routine.
> Any idea what's going on here, and how I could gather more useful > information? NYTProf needs to instrument the code it's going to profile. So it needs to be loaded as early in the process as possible. Try loading via https://metacpan.org/module/Devel::NYTProf#PROFILING with start=no per https://metacpan.org/module/Devel::NYTProf#start I suspect that's the problem. Tim. -- -- You've received this message because you are subscribed to the Devel::NYTProf Development User group. Group hosted at: http://groups.google.com/group/develnytprof-dev Project hosted at: http://perl-devel-nytprof.googlecode.com CPAN distribution: http://search.cpan.org/dist/Devel-NYTProf To post, email: [email protected] To unsubscribe, email: [email protected] --- You received this message because you are subscribed to the Google Groups "Devel::NYTProf Dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
