Php process too slow; can I increase timeout?

I am working on a php program to preprocess images. I want to
handle landscape
and portrait format images differently, and have written a
test program to copy
the original files to two different directories according to
their format. The
program is working correctly, but after it has copied about
180 of the 200 files
in the directory I am trying it on it exceeds the maximum
permitted execution
time of 30 seconds and times out.
Can I do anything to extend the limit?
Clancy

Clancy <[email protected]> wrote:
> I am working on a php program to preprocess images. I
want to handle
> landscape and portrait format images differently, and
have written a
> test program to copy the original files to two different
directories
> according to their format. The program is working
correctly, but
> after it has copied about 180 of the 200 files in the
directory I am
> trying it on it exceeds the maximum permitted execution
time of 30
> seconds and times out.
>
> Can I do anything to extend the limit?
You can either reset the limit in your php.ini (if you have
access...),
or rewrite the function so that it gets called recursively.
That would start the execution-time timer again for every
function call.
Freundliche Grüße,
Franz Marksteiner

Similar Messages

  • Question for David; was:  PHP process too slow, can I increase timeout?

    You wrote:
    > You can follow the action in PHP. Just add an echo
    command at the end of
    > the loop to display the name of the image that has been
    processed.
    At the time I commented that this did not work for me, but I
    thought it was
    because I was doing all my processing before I opened a page.
    However when I
    thought about it I realised that I had in fact opened a page
    before I started
    processing the files.
    I have just checked it again, and I open the new page, write
    a heading, then
    start copying files, echoing the name of each file as it is
    copied.
    But the result is the same. The heading appears, then there
    is a long pause,
    then all the diagnostics spit out, followed by a 'Fatal
    error: maximum execution
    time exceeded' diagnostic.
    Can I get the diagnostics to appear as they are written, or
    do they always wait
    until the php processing is completed?
    Clancy

    you can use this debug function ... it writes debug statement
    to a log file
    (debug.log) in the same folder as teh script being run. It
    assumes that PHP
    has permission to create a file on your server - but it
    should. This should
    run as the script is processing
    Alex
    function debug_log(){
    // DESCRIPTION: prints variable names and their values in a
    readable
    format within a log file
    // INPUTS: any variables of any type, include string name;
    // ex. debug("var1",$var1,"var6",$var6,...)
    global $debug_file;
    if(is_null($debug_file)){ $debug_file = "debug.log"; }
    $msg = "";
    $tab = " ";
    $arg_list = func_get_args();
    if(empty($arg_list))
    return(false);
    $count = func_num_args();
    for($i = 0; $i < $count; $i+=2){
    $j = $i+1;
    $msg .=
    _debug_format($arg_list[$i],$arg_list[$j])."\n".$tab;
    $file = fopen($debug_file,"a");
    if($file){
    fwrite($file, date('Y-m-d H:i:s')." |
    ".$_SERVER['SCRIPT_NAME'].":\n".$tab.$msg."\n");
    fclose($file);
    return true;
    }else{
    return false;

  • The font size in the iOS 7 slim bar is too small, can i increase it?

    The font size in the iOS 7 slim bar is too small (clock, battery status etc), can i increase it?

    same complaint here
    but under Accessability you can select Bold type. it helps a little to make it more readable, but it's surprising that Apple's built-in apps, like Weather, do not use Dynamic font size font and icons are way too faint and small now.
    Apple sticks to all or nothing too often and then markets the heck out if it to brainwash people into thinking it's better.
    Ive's sense of stripped down asthetics gets in the way of actual usability too often. hope someone steps in before the iphone is reduced to 1 softbutton that just does whatever apple wants it to do regardless of what the customer needs to accomplish...

  • Captivate 5 too slow, can I still purchase Captivate 4?

    I've found Captivate 5 incredibly and unworkably slow, both on my home PC (E8400 Core 2 Duo, 6GB RAM) and on my work PC (same CPU, 2GB RAM).
    It's much slower than Captivate 4 and as I'm working to very tight deadlines, Captivate 5 just won't do.
    Can I still purchase Captivate 4 from somewhere.  Really, what I'm looking for is a download purchase since I could really do with having it today rather than buying the disc online and having to wait for it to be delivered (I've used up all 30 days of my Captivate 4  trial and Captivate 5 is just terrible).
    Any suggestions would be great.
    Cheers,
    ROC

    I too am running Captivate 5 on a Windows 7 64 bit box. For me, sometimes it's slow and other times it's faster. Personally, I haven't noticed it being faster to use than Captivate 4. In many cases it does seem slower. There are periods where it like "goes to sleep" and after waiting for a while it wakes back up. When it fails to wake up, I kill the process and start Captivate life fresh and it's usually okay for a while.
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcererStone Blog
    Captivate eBooks

  • My downloads are making my computer run too slow - can I delete?

    Help! Call me stupid, or computer illiterate or whatever. But, I don't know what to do. All of my music is stored in ITunes. My computer is running really slow and I am running out of space. Can I delete my music without losing it? Will it still be held in my Itunes account? Thanks for the help

    You need some kind of backup. If you just delete it from your PC and keep it on your iPod, when you need to restore your iPod (and you will, at some point) your music will be lost.
    You'll either have to reburn CDs you own, or repurchase music from the iTunes store.
    You only get one download from iTunes:
    Apple's policy on replacement.
    http://www.info.apple.com/kbnum/n93050

  • How can I increase the hard limit of the stack size?

    Hi,
    My process gives an error of segmentation fault (SIGSEGV) that is caused because the stack limit is reached. I have a doubt about how to increase the stack size. I have tried change it with "ulimit - hard" but this size is 65532kb, and is very low for my process. How can I increase the hard limit?
    Thanks.

    When last I checked, the kernel had a fixed stack size limit.
    Do you have the source code to this application? If so, [see this Tiger stack size article|http://homepage.mac.com/eric.c/hpc/contents/documentation/How%20to%20in crease%20the%20stack%20size%20on%20Mac%20OS%20X.pdf], and specifically have a look at the +ld -stack_size+ mechanism; rebuild the code with a bigger limit.
    Entirely FWIW, this question would be more typical over in the developer forums or maybe in the Unix forum if you don't have Apple developer access. Better audience for application development and for software-related questions over there.

  • I'm on a prepaid plan for the 4s, i want the hotspot option which isn't offered on the prepaid plan.  heard the connection is too slow on the 4s only worth it on the 5 or 5s. would you agree? not sure how much the hotspot would increase my monthly bill...

    i'm on a prepaid plan for the 4s, i want the hotspot option which isn't offered on the prepaid plan.  heard the connection is too slow on the 4s only worth it on the 5 or 5s. would you agree? not sure how much the hotspot would increase my monthly bill....

    To use the hotspot for any of those devices, I believe you have to switch to a postpaid account and plan. You can see the pricing for the available postpaid plans under the "Shop" area of the website.

  • Mavericks can't use my macpro anymore....too slow

    Hi eveyone,
    I got huge problems since yesterday, my macpro as several problem like becoming very very very slow.
    I have this wheel coming every seconds, opening a windows take 1 mn minimum,etc.... I check the hard drive but it seem to be ok.
    I tried to verify permission but after one day it´s still not finish....this morning i noticed that spotlight was indexing,but because i reboot, spotlight do not index anymore but the problem(all is slow) is still present.
    Yesterday, i also noticed that time machine did not save since one day too.
    I also think spotlight and imessage do not work properly anymore ( spotlight do not recognize keychain app by example &amp; Imessages do not recognize anybody anymore....
    I have to say that i uploaded Mavericks for 1 weeks and it worked OK untill yesterday. I just had few small problem with keychain( com.apple.IcloudHelper.xpc want to use keychain 10 time by day) but that's all.
    Anyhelp would be much appreciated cause i can't work at all now.
    Thanks

    Update:
    I tried many things but i still didn't find the problem, my mac is still very slow ( it take about 30 sec/1mn  to open a window....)
    What i did was:
    - i download onyx for mavericks but each operation is very slow and often the process freeze before the end)
    - i stop spotlight indexation ( never ending)
    - i stop all timemachine process ( too long and never ending )
    - i stop internet wifi connection
    - i have verify permissions and disk ( restart +Cmd R) > All is OK
    - in the monitor activity , i don't see any strange activity
    - i change user session but it's the same...
    If anyone could give an idea to explore ! It look like a disk problem but it´s not ( onyx smart test is OK too !!!)
    HELP !!

  • XML Parsing far too slow. (How can I speed it up)

    Hey everyone,
    I am converting a site from ASP to JSP and there are a bunch of pages that parse an XML document display certain information from it. One problem is that the JSP implementation I have is far too slow. It takes ~6 seconds to load the page as we wait for it to process. I am using <x:parse> and <x:forEach> to process it using an XPath statement with the appropriate predicate ($dom/foo/bar/Route[ID > 999] for example)
    One problems I think is the size of the XML document. All the data for different pages is pushed to the same XML file and we use maybe 5-10% of the data in any one parse. I have looked at XML filters a little bit but can't seem to find a good example or a clear explanation as to whether or not this will even solve my problem.
    The root node has 5 children and the biggest one which takes up probably 3/4 of the document isn't even used by us.
    My boss wants it to be as fast as the ASP implementation which was really fast. It is 100% custom and manually probes the XML document and can skip any children which it knows won't contain any leaf's we want (mainly that big one) and is nearly instant.
    Does anyone have any ideas?
    Thanks,
    John

    Hey guys, thanks for the responses and sorry it took so long to get back - I have been busy with school an all.
    Well, first off let me say that everything in general seems far slower than what I would expect. I have eliminated different parts and everything I do eliminate seems to make is significantly faster. Does JSP seems relatively slow to you guys? I am serving it from a slower machine too but it just seems quite a bit slower than I would have expected and I don't feel I'll ever be able to match the speed of the ASP implementation.
    However, I think there is light at the end of the tunnel. I believe I found the slowest part. Surprisingly, it is not the importing or even the parsing of the file. They seem like they could take at the very most 1/2 second and the whole file takes ~5 seconds to run. The part that is causing the most delay is the five x:set tags.
    <x:set var="attrID"  select="string($r/ID)"/>is one of them. If I replace them with a piece of servlet code to assign dummy values instead, it cuts the execution by 80-90%.
    Any ideas why these may be so slow?
    Also, do you think switching to a servlet implementation would be better? I actually use some servlet code that I mean to convert over to tags once I get it working. Shouldn't the tags be about the same speed and are considered the "better" way to do things if possible?
    Thanks again,
    John

  • I just brought a brand new Macbook pro retina display, when i connect it to my apple tv through airplay its too slow and when it try to play a movie apply tv is always a minute or 2 behind. How can i fix this?

    I just brought a brand new Macbook pro retina display, when i connect it to my apple tv through airplay its too slow and when it try to play a movie apply tv is always a minute or 2 behind. How can i fix this?

    Hello HanaAmer1,
    We've an article which provides troubleshooting steps that can help get AirPlay workign correctly.
    iTunes: Troubleshooting AirPlay and AirPlay Mirroring
    http://support.apple.com/kb/TS5209
    Cheers,
    Allen

  • HT1338 My mac is becoming too slow. It takes long to open word documents, pdf files or excel documents or even safari. Can anybody suggest something? I have tried to reduce the number of open applications, but does not seem to work.

    My mac is becoming too slow. It takes long to open word documents, pdf files or excel documents or even safari. Can anybody suggest something? I have tried to reduce the number of open applications, but does not seem to work.

    Hi ...
    Checked to see how much free space there is on the startup disk lately?
    Right or control click the MacintoshHD icon. Click Get Info. In the Get Info window you will see Capacity and Available. Make sure there's a minimum of 15% free disk space.
    Freeing Up Hard Disk Space - Mac GuidesFreeing Up Hard Disk Space - Mac Guides
    If disk space is not the issue, booting in Safe Mode deletes system caches that may help.
    A Safe Mode boot takes longer then a normal boot so be patient.
    Once you see the Desktop, click the Apple menu icon top left corner of the screen.
    From the drop down menu click Restart.
    See if that makes a difference ...

  • IOS8 is too slow on iPad3! Can I restore to my 7.1.2 backup without resetting to factory defaults?

    IOS8 is too slow on iPad3! Can I restore to my 7.1.2 backup without having to reset to factory defaults? I have both iCloud and iTunes backups....

    No.
    Apple has no support or provision for reverting to a previous iOS version.
    Try a reset of your iPad by holding down the power button and hone button simultaneously until your iPad screen goes black and the Apple Logo reappears on screen, then let go of the buttons.

  • How can I get a better driver for my 1394b Hostcontroller in my Macbook pro 2010 to solve the problem, that it is too slow under Windows 7 installed with bootcamp ?

    How can I get a better driver for my 1394b Hostcontroller in my Macbook pro 2010 to solve the problem, that it is too slow under Windows 7 installed with bootcamp ?
    WIndows can't find a better one than the installed LSI Conformed 1394 Hostcontroller

    Read and follow the Bootcamp Installation instructions that you were offered to view when you ran Bootcamp Assistant.
    Run Bootcamp Assistant again and select the option to download the Bootcamp Support software. Follow the instructions. Then boot into Windows and install the Windows Support software you downloaded and saved.

  • After change to Mavericks my Mac become too slow e I can't use it because stays asking passwords for "talagent" and "messages agent" as icloud keys. I got changed the icloud password many times and still doesn't work. I can't open any program.

    After change to Mavericks my Mac become too slow e I can't use it because stays asking passwords for "talagent" and "messages agent" as icloud keys. I got changed the icloud password many times and still doesn't work. I can't open any program.

    Back up all data.
    Launch the Keychain Access application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Keychain Access in the icon grid.
    Select the login keychain from the list on the left side of the Keychain Access window. If your default keychain has a different name, select that.
    If the lock icon in the top left corner of the window shows that the keychain is locked, click to unlock it. You'll be prompted for the keychain password, which is the same as your login password, unless you've changed it.
    Right-click or control-click the login entry in the list. From the menu that pops up, select Change Settings for Keychain "login". In the sheet that opens, uncheck both boxes, if not already unchecked.
    From the menu bar, select
    Keychain Access ▹ Preferences ▹ First Aid
    If the box marked Keep login keychain unlocked is not checked, check it.
    Select
    Keychain Access ▹ Keychain First Aid
    from the menu bar and repair the keychain. Quit Keychain Access.

  • The fonts are too small on my imac desktop and web browsers.  Where can I increase the size?

    The fonts are too small on my imac desktop and web browsers.  Where can I increase the size?

    babowa wrote:
    The only way to increase the fonts on your desktop would be system wide by going down a notch on the resolution. Some people won't do it because it increases the pixel size so the fonts won't be quite as sharp; I decided I'd rather have that than having to squint continuously. Go to System Preferences > Displays > Scaled > this will give you all resolution options available. No harm in trying - just check the default (top) choice again if you don't like any of the others.
    It's a b*&^ch getting old .  I still use the screen zoom instead of decreasing resolution, but maybe soon ...

Maybe you are looking for