Struggling to upload large video files Ajax and PHP

I am trying to connect to Vimeo with the Vimeo API to upload large video files of 500mb avg.

I have a form that captures the video file name then I send this over to the server with AJAX.
I retrieve it like this inside my php script:

$file_with_path = $_FILES['upload_video']['tmp_name'];

If the video file is small I have not problem. Upload is successful. Once the file gets large I get a POST 503 server error and…

PHP Undefined index: upload_video error

It seems for larger files the file name and path value does not transfer over to the php script.

I host with godaddy and my file upload size is 1GB. My max execution time is also set to 600 seconds.

Any ideas why this is happening?

This is typically caused by running against server resource limits. What type of GoDaddy account do you have? What plan? Is it shared hosting?

Besides the file upload size and execution time, you might need to increase your memory usage too.

Perhaps you can send a message to GoDaddy support and see if they can point you in the direction of what is going on. Either way it sounds like perhaps you are just running against some server limit. On shared hosting plans, they don’t want a bunch of people uploading massive files because it will reduce the performance for everyone you share the hosting with.

The memory is currently set to 512MB but I can increase it in a config file.

I have the business hosting plan. Not shared hosting:
1 Virtually Allocated CPU Core
2GB RAM
60GB Storage

Hmmm ok. Have you tried varying sizes? Where does it seem to start giving you the error? Are you able to upload something like 400MB fine? Because if you can, then you can guess that perhaps you are just running against a limit and that will give you an idea where the limit is and where to look to find that value set. I know it is not very scientific, but if you know that there is some limit at like 350MB then you can go looking for where a setting might have you capped at 350MB if you get what I am saying. :slight_smile:

Im trying to figure this out and on call now with GD. I have tried upload 30mb with no problem. It seems that when I hit 100Mb + it crashes.

Play with: post_max_size, upload_max_filesize, memory_limit settings