I fetch some data from the remote server and feed it into my site database .It having 9 lakhs of records(app) but the insertion of records stopped 60,180 records only.we use mailto function and exception handler to find the bugs but no response.Anyone please advice me whether the cron get timeout or we have error in code our code is
<?php
set_time_limit(0);
ignore_user_abort();
try
{
$ch = curl_init();
// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, "http://ks329xxx.com/cronRU/update");
curl_setopt($ch, CURLOPT_HEADER, 0);
// grab URL and pass it to the browser
curl_exec($ch);
// close cURL resource, and free up system resources
curl_close($ch);
}
catch (Exception $e)
{
echo 'Caught exception: ', $e->getMessage(), "\n";
mail('varunxxxx@xxxxx.com', 'update', $message);
}
?>