On Sat, 20 Aug 2005, Octavian Rasnita wrote:

Hi,

I have made a site using mod_perl with ModPerl::Registry.

It works much faster than using a simple cgi script, but it still works slow sometimes and I would like to change some things.

There are 3 situations:

1. The page is displayed pretty fast (less than a second)

2. The same kind of page is displayed very slow (more than 20 seconds)

3. The same kind of page, sometimes is still "Opening page..." for tens of seconds, and after that appears a 404 Not Found error. If I refresh that page immediately after that, it is displayed very fast with no problem.

Please tell me how I can test:

- Why that 404 error appears

- Why sometimes it takes so long to display the same kind of page other times displays much faster

- How can I test where the script hangs, which part of the script is so slow

I assume, for the delay problem, you've ruled out correlations with a (momentary) high server load?

Does the script involve a database connection that
may sometimes be a bottleneck?

Does anything useful appear in the error log? The Apache "ab" program may be useful in this regard.

At least for linux, the Apache::DB module (see especially
Apache::SmallProf) may help in tracking down where the
script is spending most of its time.

If these don't help, can you post a minimal script, and
configuration, which illustrates the problem?

--
best regards,
randy kobes

Reply via email to