Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Re: Re: [SOLVED] Beating the system

by mikeirw (Pilgrim)
on Oct 01, 2002 at 00:07 UTC ( #201899=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: [SOLVED] Beating the system
in thread Beating the system

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.


Comment on Re: Re: Re: [SOLVED] Beating the system
Select or Download Code
Re: Re: Re: Re: [SOLVED] Beating the system
by diotalevi (Canon) on Oct 01, 2002 at 00:21 UTC

    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.

      I must say that I don't fully understand why there's that much of a difference, but it is working for me. I'm still researching the problem, though.

      I appreciate your help.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2014-07-13 06:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (247 votes), past polls