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 othertimes displays much faster- How can I test where the script hangs, which part of the script is so slow
I'd look into your apache error logs you can also do a print STDERR "crap" on certain blocks of code and tail -f /var/log/apache/mp_errorlog (thats my error log for modperl) then look to see where stuff is hanging