/    Sign up×
Community /Pin to ProfileBookmark

Maximum execution time of 6000 seconds exceeded

Hello

Im currently working on an upload script for videos, meaning it will take some time for the page to load. I have configured an .htaccess file in the folder as well as set the set_time_limit function to give the script 6000 seconds to execute.

But the problem is that just randomly it returns this error msg:

Fatal error: Maximum execution time of 6000 seconds exceeded in *** on line 3

Even though I tested with a small file that took at max 3 minutes to upload. 6000 seconds is by my math about 1,5 hour.

The script does a move_uploaded_file, and runs ffmpeg with the file to extract a tumbnail before it compresses and converts the file to flv and then at the end deletes the source video file uploaded.

Anyone got any Ideas what might be causing this random timeout?

to post a comment
PHP

8 Comments(s)

Copy linkTweet thisAlerts:
@aj_nscDec 10.2009 — Just because you have set a max_execution_time at runtime doesn't mean you're actually allowed to do so, or that it actually matters.

Contact your host first and find out if the server has any timeouts specified, or if you're allowed to change max_execution_time at runtime, or at all.
Copy linkTweet thisAlerts:
@ReisauthorDec 10.2009 — I am my own host and have 100% control over the server
Copy linkTweet thisAlerts:
@ReisauthorDec 14.2009 — Anyone?
Copy linkTweet thisAlerts:
@NogDogDec 14.2009 — Do you have safe_mode turned on? If so, you can only change max_execution_time via php.ini (or else turn safe_mode off).
Copy linkTweet thisAlerts:
@ReisauthorDec 14.2009 — I do not have sage mode turned on no ?
Copy linkTweet thisAlerts:
@NogDogDec 14.2009 — What happens if you set it to 0 (zero) for no timeout?
Copy linkTweet thisAlerts:
@ReisauthorDec 17.2009 — I fist accidentially wrote 00 instead of 6000 (forgot the 6) which i assume is the same as 0 (zero), and the error appeared the same way, only it reported that Maximum execution time of 0 seconds exceeded
×

Success!

Help @Reis spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.10,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...