Anyone have any ideas on what to do now?
I know naff all about PerlEz or Mod_perl, but I would think the next thing to do is determine if it is all scripts on that server, or just this particular script.
Ie. Write a simple script that does nothing except produce the timing information as above.
- If that also displays the same effects, it is a 'server problem'.
Contact the hoster and ask for a different setup?
- If not, then you're down to trying to isolate what it is in that script that causes it.
The usual process of commenting everything but the timing code out and then putting it back a bit at a time until the problem manifects itself again seems appropriate.
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] |
I isolating is kind of hard since I use one central code that loads functions. So it would pretty much means rewriting the entire code.
What PerlEX and Mod_Perl do is they pre-load a lot of the variables and start up into memory and then execute threads that access the persistent data.
personally I do not think im storing that much data into ram that would give it issues in spawning threads but it could be my use of namespaces :/..if there was only a way..maybe ISAPI component to monitor script start up or etc :/...or maybe some apache functions?
| [reply] |
You don't have rewrite or even change the script.
Make a copy of it, with the timing code, under a different url.
Comment out everything except the timing code and run it.
Still the same effect?
- Yes: Your server set-up isn't what you think it is or it is screwed.
- No.
- Uncomment half the script.
- Run it again. Still okay?
- Yes: Uncomment half of the remaining code. Goto 2b
- No: Re-comment half the code you just uncommented. Goto 2b
You'll rapidly find the line of the code that screwing you.
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] |
or ModPerl and PerlEX are loosing their cache/taking long time to access the cache?
Or you're not using ModPerl/PerlEX at all, and its just plain CGI (or the really really slow one is running as CGI) | [reply] |
I assure you that isn't the case..I wanted to see what would happen if I ran it as regular CGI...it completely froze my server and had to restart. Regular CGI would never be able to achieve 0.07 loading speeds..well maybe a "Hello World"? (not to mention the start up time would not be the issue but execution time would be..as regular perl it took 8 seconds to load..4 seconds for begin block and 4 seconds for regular code execution)
Anyways point being is I'm 100% sure it is all PerlEX/Mod_Perl.
| [reply] |