Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I'm still trying to find out if there's a resource limit with my server, but if someone could shed some light on the situation anyway....
Series of Perl scripts - all variables are passed thru either GET or POST methods thru a single 'index.cgi' file.
The system is multi-lingual (depending upon user setting) and I have the various language libraries outside of webspace in their respective directories (ie: .../langs/eng .../langs/esp .../langs/fre etc...).
Depending upon the 'action' of the user, various files are 'required' and the appropriate sub routine(s) is/are duly called. (top-level actions being the 'Main Menu' for example, and 2nd-level actions being 'Main Menu --> User Config' - etc. You get the idea.)
The vast majority of 'on-screen' text is contained within arrays - most are multi-dim arrays, and only very few are 2-dim or simple variables. The vast majority of images/icons used are assigned to individual variables, and some are contained within their own arrays.
With the exception of 'images.lib' (which is required within the index.cgi file) each language file is 'required' as and when, but this 'break-down' system isn't used 100% (85% yes) within the system. Also, the whole thing is template-based, opening various *.tmpl files according to the 'action' and then doing a
\$line =~ s/<THIS\>/<THAT\>/g;
substitution for each line within the tmpl file.
The odd thing that is happening (problem appears to be affecting 2 separate Admin systems hosted on different servers) is that certain 2nd level 'actions' are being executed correctly - as they should - but others are not. I can't asess if those that aren't working are more processor-intensive than the ones that are working correctly (can't = don't know how to, or even if I can find out!).
No 500 errors, no 404's, none of the usual errors occur - except when I've caused a fatal error for self re-assurance! - the system just times-out. Even down to the modem icons; no data is being exchanged.
In my system, it works if I have fewer variables set in the 'images.lib' file (which normally contains +/- 100 variables set to the HTML IMG tag) yet my client's system was working as of last week. Now, not having made any changes to that system at all, 2 of the 2nd-level menu actions have the same problem.
My host says they haven't made any changes to their servers and due to my initial tests (using my system) it appears to point towards a server processor +/or memory issue (I think).
Is there any way of finding out how 'hungry' my scripts are? Is there a limit (in Perl internals) to the number of variables and/or arrays in memory at any one time? Is there a limit on the number of processes at any one time? What constitutes a 'big' program - 100 vars, 1,000 vars, 5MB/50MB in memory ?!?
I've been looking through the Perl Camel book and nothing jumps out at me. I'd like to solve this one, 'cos my system is worthless at the moment, and I have a 3rd system based on the 1st & 2nd and am waiting for that to go south too!
Can anyone shed some light as to the possible causes? Pointers in the right direction won't go unwelcomed either! ;-) I also hope I've given a reasonalbe explanation for others to understand.
Looking forward to any help whatsoever.
Kind regards
Richard.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Possible Server Resources problem
by tachyon (Chancellor) on Sep 10, 2004 at 00:37 UTC | |
by meetn2veg (Scribe) on Sep 10, 2004 at 02:15 UTC | |
by tachyon (Chancellor) on Sep 10, 2004 at 03:52 UTC | |
by meetn2veg (Scribe) on Sep 10, 2004 at 13:50 UTC | |
|
Re: Possible Server Resources problem
by graff (Chancellor) on Sep 10, 2004 at 02:43 UTC |