Need help with php.ini file to allow the import to run long enough to import all pics.

marshra

Joined: 2005-09-11
Posts: 4
Posted: Sun, 2006-07-16 08:33

I have 1and1 webhosting. They say I can modify php var values by popping in a php.ini file in the dir that I need to to access. That means the main dir with main.php in it? I was also instructed to put it in any other place the php file would be called from. Do I need to place it other places?

I run into two problems.

When I try to import it can only import for baout 30 seconds.. which is about 50 pics. The progress bar goes, and then just stops. No continue, no errors, just stops. And the progress bar in IE goes grey and stops refreshing. It can't be a error in programming or corruption becuase the mem stops at different places, and the number of pics varies. So it has to be a timed thing.

Second thing:

When I try to delete a huge amount of albums agian, it goes for x amount of time, and stops. Only here I get a error 500 internal server error. Which I assume is the timeout feature in php. I don't know what var to pop in or change.

 
marshra

Joined: 2005-09-11
Posts: 4
Posted: Sat, 2006-07-22 23:55

Well I'm glad I got tons of help here:)

So after fighting with my hosting company (1and1.com), I was able to get them to raise the limits. Here is what I got from their tech support.

Thank you for contacting us.

This is definitely a problem of excessive CPU usage, this is a very resource intensive script. In both cases (importing and deleting a gallery), the process will use 10 seconds of CPU-time (equating to usually around 20 seconds using about 50% of the server's resources), after which time the process is killed. I have seen this problem before with this same gallery script. The bottom line is that it is probably too resource intensive to be used in a shared hosting environment, unless you can just do smaller operations, such as deleting or importing only a few images at a time.

After a few more questions about the restrictions on the cpu usage here is what I was told:

To expand further on how the limits work:

The limit that is relevant in this case is the CPU time. A given process can use up to 10 seconds of CPU time before it is killed. CPU time means the number of seconds that the script uses 100% of the CPU. In practice the process will almost never use 100% of the CPU since it is shared with other users. So if the CPU usage averages at around 50%, the process will run for around 20 seconds before being killed. If the process averages 25%, it will last for 40 seconds, and so on. "Pausing" the process won't make a difference, although if the script can spawn
several processes to each to part of the job it could help; however there are also limits on the number of simultaneous processes that can exists. The limit on simultaneous processes is 12.

FAQ: Progress bars don't work, what's wrong?

 
ragingfish

Joined: 2005-04-27
Posts: 3
Posted: Fri, 2009-07-31 03:30

i am having the same problem wtih 1&1.

is there a way to "throttle" gallery's resource usage so it doesn't trigger that threshold at which their servers kill the process?

my gallery has been down for a few months now because i can't do imports or anything because every time i try, my process is killed. :(

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Fri, 2009-07-31 04:55
Quote:
is there a way to "throttle" gallery's resource usage so it doesn't trigger that threshold at which their servers kill the process?

Change hosts :)
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here