Thursday, November 7, 2013

Debugging a SQL query that is causing the page to timeout

Hi,

I have the following query that is causing the page to timeout:

        $this->QuestionnaireQuestionnaire->contain(array(
            'QuestionnaireAssignment' => array(
                'QuestionnaireAssignmentName' => array(
                    'QuestionnaireAnswer'
                )
            )
        ));

It generates the following error:

Fatal error: Maximum execution time of 120 seconds exceeded in D:\inetpub\CakePHP\app\cake\libs\model\datasources\dbo_source.php on line 1092

 To try and debug this, I've set the debug line in config.php to have a value of 2, and then added <?php echo $this->element('sql_dump');?> to the bottom of the ctp view file... but since the page is timing out I have no way of seeing what is being generated

Any ideas please?

Many thanks

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: