Max execution time for PHP scripts?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • CSS
    Junior Member
    • May 2004
    • 21

    #1

    Max execution time for PHP scripts?

    I have a script that takes a while to run - 6-7 minutes I think. Its not processor intensive but it takes some time because it downloads some files.

    On my home server (on windows Apache setup) the script runs fine, but on Dthorn it fails after a while. Can this be because Dathorn does not allow scripts to run for more that a certain time? (I already have set_time_limit(0) in my PHP)
  • AndrewT
    Administrator
    • Mar 2004
    • 3655

    #2
    You really should not be running processes that take even nearly that long to run. 6-7 minutes of downloading is a LOT of data on a 10Mbps or 100Mbps connection depending on which server you are on.

    Comment

    • CSS
      Junior Member
      • May 2004
      • 21

      #3
      Its not one big download. It just takes small files and process them. In total they are less than 8MB.

      On further investigation it seems that the problem is that a mysql_error kills the proccess.
      While I truncate the tables before the execution I get a "Duplicate entry for key" error. What is more strange is that this error doesn't happen always at the same file, and that at my home PC it doesn't happen at all.

      Any clues about what can be wrong?

      Comment

      • AndrewT
        Administrator
        • Mar 2004
        • 3655

        #4
        There's just a coding error in there somewhere that's causing it, really not something we can help with.

        Comment

        • Buddha
          Senior Member
          • Mar 2004
          • 825

          #5
          My favorite PHP forum: phpDN

          There are always some problems going from Windows to Linux.

          You really should not be running processes that take even nearly that long to run. 6-7 minutes of downloading is a LOT of data on a 10Mbps or 100Mbps connection depending on which server you are on.
          Just thought that beared repeating. Just in case.
          "Whatcha mean I shouldn't be rude to my clients?! If you want polite then there will be a substantial fee increase." - Buddha

          Comment

          • CSS
            Junior Member
            • May 2004
            • 21

            #6
            There's just a coding error in there somewhere that's causing it, really not something we can help with.
            Well, I run the script several times. It always failed while processing a different file, and finally after 6-7 tries it managed to process all files.

            If there was a codding error wouldn't it always fail at the same place?

            Comment

            • AndrewT
              Administrator
              • Mar 2004
              • 3655

              #7
              Not necessarily. Something is causing that error, you'll have to isolate parts of it and find out what it is. We do not debug customer scripts so you're on your own there.

              Comment

              • Jonathan
                Senior Member
                • Mar 2004
                • 1229

                #8
                Originally posted by AndrewT
                Not necessarily. Something is causing that error, you'll have to isolate parts of it and find out what it is. We do not debug customer scripts so you're on your own there.
                As it should be We'd rather your time spent looking
                after the servers and what not.. more useful for us
                "How can someone be so distracted yet so focused?"
                - C

                Comment

                • Buddha
                  Senior Member
                  • Mar 2004
                  • 825

                  #9
                  Originally posted by Jonathan
                  As it should be We'd rather your time spent looking
                  after the servers and what not.. more useful for us
                  Yes indeed! Hey got any Cobra pictures yet?
                  "Whatcha mean I shouldn't be rude to my clients?! If you want polite then there will be a substantial fee increase." - Buddha

                  Comment

                  • AndrewT
                    Administrator
                    • Mar 2004
                    • 3655

                    #10
                    Originally posted by Buddha
                    Yes indeed! Hey got any Cobra pictures yet?
                    The car is not done yet, hope to have it all running and broken in by Thanksgiving but we'll see. But here's a pic of my new 7 liter friend

                    Comment

                    • Buddha
                      Senior Member
                      • Mar 2004
                      • 825

                      #11
                      Originally posted by AndrewT
                      The car is not done yet, hope to have it all running and broken in by Thanksgiving but we'll see. But here's a pic of my new 7 liter friend
                      Nice looking friend you got there!
                      "Whatcha mean I shouldn't be rude to my clients?! If you want polite then there will be a substantial fee increase." - Buddha

                      Comment

                      Working...