My site handles more than half million records. A php stored procedure call was triggered using an ajax call from the webpage. When too many data comes in the procedure takes too much time, which results in a request timeout. But the stored procedure is executed. We increased the apache timeout. But we can't depend on that for longer run. Since the procedure takes 2 or 3 mins to run now. I using laravel 4.1 framework for the website. Is there an optimized way of resolving this issue. Somebody please help me with this.
Ajax Call
$.ajax({
url: baseUrl + '/matchload',
data: {
format: 'json'
},
error: function(jqXHR, textStatus, errorThrown) {
console.log(textStatus, errorThrown);
},
dataType: 'json',
success: function(result) {
matchLoad();
console.log('success');
},
type: 'GET'
});