Server throws errors from time to time randomly - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Server throws errors from time to time randomly (/showthread.php?tid=58321) |
Server throws errors from time to time randomly - El Forum - 06-03-2013 [eluser]predi[/eluser] php 5.3.3 ci 2.1.3 server dedicated, cpu usage 5%, 7 gb ram free, mid traffic. Server keeps throwing this error from time to time, when i randomly refresh the page. I.e. i refresh the page - all works. Keep refreshing and randomly get this error: Code: Fatal error: Call to a member function item() on a non-object in /var/www/system/core/Router.php on line 110 I've investigated the Router.php 110 line, this part fails Code: if ($this->config->item('enable_query_strings') Fails because $this->config is randomly NULL, so the config class just doesn't load-up randomly. Why? How?! I've modified the Router class, added force class load code: Code: if($this->config === NULL) Still get the error and "How can that be?" message randomly. Anyone knows seems to be the problem? UPDATE I've modified the Router's constructor to the following: Code: /** Now i randomly get the die message "router->construct :: fail". So, why question is the same - why and how to fix? Server throws errors from time to time randomly - El Forum - 06-03-2013 [eluser]predi[/eluser] Made some nice crutches to make CI work properly... Random error gone away, but still this is not a solution. Got to figure out what is the exact problem of the random failure. Code: /** Server throws errors from time to time randomly - El Forum - 07-04-2013 [eluser]Unknown[/eluser] Have a same problem. try restart apache problem in apache. I do not know what exactly you want to change the settings in Apache, but reboot helps temporarily for debian: sudo /etc/init.d/apache2 restart php 5.3.3 ci 2.1.3 server dedicated, cpu usage low, 10 gb ram free, traffic 50000pages per day. |