Well based on your less than enligtening description:
- If you are on Win32 get used to it, this is SOP. Attend to your 3 finger salute.
- If you are on *nix I suggest not slurping the entire contents of your file system into a scalar. This leads to memory exhaustion and data is then swapped to disk. This is bad, as it means you have yet more info to read
- fork while 1 is bad
Seriously how on earth do you expect anyone to offer any sort or sensible suggestion based on your 'invisible code that does script like stuff does not work under stress crashing computers (plural?) on unspecified operating system using some version of some scripting language, presumably perl' description?
I would suggest Tutorials and some of the how to ask a question links as the first stop. Then I would suggest posting a snippet of code that recreates you does not work issue here.
High on the list is using all your memory and hitting swap.
| [reply] |
If the script mostly consumes memory and CPU, it oughtn't crash a properly tuned operating system. If you're on Unix, check out limits (ulimit with bash, limit with (t)csh, etc.) and avoid running the script as root.
After you've got that set up, you can safely run the script on smaller datasets and try to see why it goes wild. Does it not reuse resources? Must it keep track of everything at the same time, or can the job be split up to smaller tasks? It's hard to give more specific advice without more specific knowledge of your problem, but these are the kind of questions to ask. | [reply] [d/l] [select] |
If the script is small, post it. If long, reduce it to a smaller script that misbehaves. Then post it. It's unlikely that you'll get meaningful help as we speculate and what your script might be doing.
| [reply] |