iarp Posted August 30, 2012 Share Posted August 30, 2012 max_execution_time = 600 max_input_time = 200 Is set in the php.ini My script runs exec("wget $url"); # This line uploads the wget'd item to my amazon s3 bucket # Email about status, successful or not /* * Series of inserts into mysql */ Now, it downloads, uploads and emails without issue, but the queries don't execute. There is no errors shown at all, and nothing in the database afterwards. The file is anywhere from 60-100MB's, and takes about 4seconds to download, 12-30seconds to upload. I'm not sure if it's the execution time, or maybe running out of resources to execute mysql queries? Not sure what to do from here. Quote Link to comment https://forums.phpfreaks.com/topic/267781-unsure-if-execution-is-too-long/ Share on other sites More sharing options...
iarp Posted August 30, 2012 Author Share Posted August 30, 2012 The query's all worked, i echo'd them out and could see them all after the script stopped, and then manually tried them in mysql. So my next thought was an issue about resources (being on a shared server and all). So i mysql_close() after the query in the header area and then opened a new connection right above the queries. It works now, something must've been going on with mysql dropping the connection or something i'm unsure of. Quote Link to comment https://forums.phpfreaks.com/topic/267781-unsure-if-execution-is-too-long/#findComment-1373740 Share on other sites More sharing options...
Christian F. Posted August 30, 2012 Share Posted August 30, 2012 I'd build a back-end system for handling the downloads, and consequential insertions into the database. So that it cold operate independently of the page loads. Quite easily done too, as all you need to do is to start a background process which can be another PHP script. Quote Link to comment https://forums.phpfreaks.com/topic/267781-unsure-if-execution-is-too-long/#findComment-1373957 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.