Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: [SOLVED] Beating the system

by mikeirw (Pilgrim)
on Sep 30, 2002 at 22:27 UTC ( #201875=note: print w/ replies, xml ) Need Help??


in reply to Beating the system

Well, it looks like it was a memory issue after all. After changing a couple of packages from use to require, everything seems to work fine.

A big thank you to everyone for their help. I definitely picked up some useful debugging tips.


Comment on Re: [SOLVED] Beating the system
Select or Download Code
Re: Re: [SOLVED] Beating the system
by dws (Chancellor) on Sep 30, 2002 at 22:36 UTC
    After changing a couple of packages from use to require, everything seems to work fine.

    Details, please. This sounds a bit too much like "I did stuff until things seemed to work."

      I came to this solution (after trying many of the suggestions posted) by commenting out parts of the script to see what kind of effect it had.

      For example, I have a couple of subs that I invoke after the uploaded file is written to disk that do various things depending on the file type. The subs require a couple of different packages that I was use'ing at the top of the script. If I commented out those subs and their required packages, I was able to get larger files uploaded with no problem. The next thing was to figure why these subs were causing the script to be killed before they were even invoked.

      The reason I didn't think they were a problem initially was because any file that was 35 KB or under worked flawlessly, while anything above caused the script to be killed before it could write the file to disk, hence they were never called. By changing the packages that these subs need from being use'd to require'd, I was able to upload much larger files without the script being killed and still have them work their magic.

        That makes little sense. I've been under the apprehension that use differs from require in that it happens during BEGIN and calls the import method on the package. Your fix strikes me as something that is tenuous and if you don't find the actual problem at least put some comments in the code with perhaps a URL back to this link. I'm imagining that a year later this same code will break for some other reason just because I think the actual difference you're involving is so little. I think I'm going to go back and look at the objects you're loading and see what import() does for each but offhand I'm surprised this makes a difference.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://201875]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2014-07-30 23:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (241 votes), past polls