I have a click function that triggers a php script through AJAX. The php script starts a video upload to Vimeo. My problem is the Apache server is set to timeout after 5 minutes and I do not have root access to configure this. I can see the uploading takes place for exactly 5 minutes…then crashes…503 timeout error.
How do I long poll the server with this Ajax function? So how can I check every 10 seconds if there is a response and keep checking longer than 5 minutes. (Some uploads can take 15+ minutes)
$('#videoSubmit').on('click', function(event) {
........
.......
$.ajax({
url: 'create_vimeo_upload.php',
dataType: 'text',
cache: false,
contentType: false,
processData: false,
data: video_data,
type: 'post',
dataType: 'HTML',
success: function(response){
tmpdiv.innerHTML += '<br/>' + response;
}
});
});