So I have this odd problem and not sure how to overcome it...
I have a script that deals with importing data into mysql from a .csv file. Due to the size of the data, and the data cleansing and consolidation that takes place in the script it can take a few minutes to complete.
About 60 seconds in to the execution (if its a large file) the page redirects to the home page, however the script continues to run in the background and it does complete successfully.
My question is why would the page be going back to the home page, when the script hasn't completed? There are no page redirects in the script its self (not until its completed anyway and this is not to the home page), and there are no logged errors, like exhausted memory or over run the max allowed time.
If I upload a small .csv file (say 6MB) the script completes and redirects to a success page as it should, however larger .csv files (say 50MB+) redirect to the home page after about 60 seconds, however the script is still running in the background and does complete about 2-3 mins later without error.
Any idea what could be causing this, I am at a loss. The data is uploading and saving etc fully and correctly its just the redirect to the home page on larger files that it making it look like it has failed and then the user tries to upload again, but the original request is still running in the background so the data then gets duplicated.
Any help is appreciated :o)