Jump to content

PraveenSubramaniyam

Members
  • Posts

    6
  • Joined

  • Last visited

Everything posted by PraveenSubramaniyam

  1. sorry for the post .. Im wrong .. both crashes at the same time .. Nothing diff in the function call_user_func_array()
  2. I'm working on a php project . A class file which has function index which has a while loop that runs indefinitely sleeping every 3 sec and printing some information . so I wrote a php script which creates an object of tht class file and runs the class function using call_user_func_array function . But the script crashes every 2.30 hours (approximately) with the error "maximum execution time of 300 secs exceeded " . so tried a different script which doesnt have a class file and have a while loop sleeping every 3 sec and printing the same information . But this script does not crash at all .. Can some one pls help me on what call_user_func_array does ?? main.php <?php set_time_limit(300); require("/project/DCM/dcm.php"); $foo = new Dcm(); call_user_func_array(array($foo, "index"),array()); ?> class Dcm { public function wakeup_device() { for($i=0;$i<1000;$i++) { print("bfr request :".date("Y-m-d H:i:s:u")."\n"); print("Time ..$i"); print("after request :".date("Y-m-d H:i:s:u")."\n"); } } public function index() { while(1) { $this->wakeup_device(); sleep(3); } } } test.php <?php set_time_limit(300); while(1) { $i=0; for($i=0;$i<1000;$i++) print("\n".date("Y-m-d H:i:s")."test ..$i\n"); sleep(3); } ?>
  3. I tried increasing the max_execution_time value in code_ignitor settings but it happens after tht value or the whole system becomes too slow .. Code Ignitor have a setting for max_execution_time as 300 .
  4. Im using the codeignitor php framework which has the files DB_active_rec.php , db_driver.php , mysql_driver.php ... And everytime im getting same error but in these different files at different line number . hence Im sure tht reading too much data from database causing this error .. but cant even guess why and where exactly it happens .. And since those files are written by code ignitor im finding it difficult to debug too ..
  5. Im using code ignitor and Im getting the following error when i run my script . PHP Fatal error: Maximum execution time of 300 seconds exceeded in /system/system_2.1.3/database/DB_active_rec.php on line 1979 protected function _reset_run($ar_reset_items) { foreach ($ar_reset_items as $item => $default_value) (line no 1979) { if ( ! in_array($item, $this->ar_store_array)) { $this->$item = $default_value; } } } .. In my db im having about 1000 records in a table and im polling every 3 seconds in my script to read from db . And im getting the error at every 20th minute . Can anyone pls help ..
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.