Skip to content
Advertisement

Trying to load large video but getting ‘503 Service Unavailable’

I’m having a problem loading a large video into the browser. I have a video.php file, which creates a $token to access the product specified in $_GET['product'] and then video.js requests access to the video files.

JavaScript

The server should then return the chunks of the video. The videos are stored like this:

JavaScript

It duplicates the folder to tmp with the name of the folder is the token. Let’s say the token was 1234123412341234:

JavaScript

And the files get deleted as they are loaded.

When I try to access mysite.com/video.php?product=1, I get 503 Service Unavailable.

The total size of the video files are about 1-2GB big and I’m using GoDaddy hosting.

Thanks!

Advertisement

Answer

I found out that my PHP was timing out. My php.ini file had a max_execution_time of 600 (5 minutes), so when I changed the max_execution_time to -1, it fixed the problem.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement