0

I have an issue with my Cakephp application. I find that once a day or maybe once every two days PHP will lock up and become unresponsive resulting the the process crashing and restarting.

From what i've read this may be caused by a method in an endless loop. As the application is very large is there anyway that I can capture activity of all my users in logs and see what methods arent finishing.

If anyone can suggest plugins, components or methodologies that I could use to do something like this. FYI I would like to avoid adding a log statement to every method in my application.

Additional Info:

  1. Cakephp 2.1
  2. Error Message in PHP error logs: PHP Fatal error:

    Maximum execution time of 300 seconds exceeded in ...lib\Cake\Model\Datasource\CakeSession.php on line 609

1
  • For issues like this, it may be worth including the exact version you're using (2.1.0?) Be sure to upgrade to the latest version of CakePHP 2.1 to have all bug fixes applied. Try to remove the CakePHP cache files, and check if those directories are writable for PHP it's possible that a file or directory is locked, causing problems. Commented Apr 1, 2013 at 7:12

1 Answer 1

1

Have you considered writing custom log methods and simply catching cakephp's exceptions / errors? This would avoid you having to put log statements in every single place.

http://book.cakephp.org/2.0/en/core-libraries/logging.html

Depending on how large your application is you could look into implementing a nosql log system. couchbase with memcached (http://www.couchbase.com/) to store all the logged events. Might be preferred to cakephp default of storing all log information in a large text file.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.