2013-03-11 5 views
1

내가이 쿼리 (PostgreSQL을)이 : PgAdmin, EMS 클라이언트, Navicat는, 포스트 그레스 명령 줄, 무엇이든에 https://gist.github.com/patrickmaciel/74c72cdf1984bdcde804쿼리 PgAdmin에서 작동하지만 CakePHP의

이의 작품.

  • 8.2 : 19S
  • 9.2 : 나는 포스트 그레스 데이터베이스의 두 버전이 쿼리를 테스트 16ms

그러나 $this->query($sql);와 CakePHP를 작동하지 않습니다 : 2013년 3월 11일 (17) : 59 : 48 오류 : [FatalErrorException] 최대 실행 시간이 30 초를 초과했습니다.

CakePHP는이 쿼리를 다른 방식으로 실행하고 있습니까?

#8 ...........................\app\Controller\Component\CommonCheckComponent.php(64): CommonCheckComponent->validateCheckPromotion(Array, Array, NULL) 
#9 ...........................\app\Controller\Component\CommonCheckComponent.php(40): CommonCheckComponent->applyCheckPromotion(Array, Array) 
#10 ...........................\app\Controller\Component\CommonTableComponent.php(56): CommonCheckComponent->insertDefaultPromotions(Array) 
#11 ...........................\app\Controller\ChecksController.php(42): CommonTableComponent->putTableInCheck(Array, '374') 
#12 [internal function]: ChecksController->printCheck('28') 
#13 ...........................\lib\Cake\Controller\Controller.php(486): ReflectionMethod->invokeArgs(Object(ChecksController), Array) 
#14 ...........................\lib\Cake\Routing\Dispatcher.php(187): Controller->invokeAction(Object(CakeRequest)) 
#15 ...........................\lib\Cake\Routing\Dispatcher.php(162): Dispatcher->_invoke(Object(ChecksController), Object(CakeRequest), Object(CakeResponse)) 
#16 ...........................\app\webroot\index.php(109): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse)) 
#17 {main} 
2013-03-11 17:59:48 Error: Fatal Error (1): Maximum execution time of 30 seconds exceeded in [...........................\lib\Cake\Model\Datasource\DboSource.ph 
p, line 460] 
2013-03-11 17:59:48 Error: [FatalErrorException] Maximum execution time of 30 seconds exceeded 
Request URL: /patrick/chima-rms/chimarms/checks/printCheck/28 
Stack Trace: 
#0 ...........................\lib\Cake\Error\ErrorHandler.php(184): ErrorHandler::handleFatalError(1, 'Maximum executi...', 'C:\www\patrick\...', 460) 
#1 [internal function]: ErrorHandler::handleError(1, 'Maximum executi...', 'C:\www\patrick\...', 460, Array) 
#2 ...........................\lib\Cake\Core\App.php(927): call_user_func('ErrorHandler::h...', 1, 'Maximum executi...', 'C:\www\patrick\...', 460, Array) 
#3 ...........................\lib\Cake\Core\App.php(900): App::_checkFatalError() 
#4 [internal function]: App::shutdown() 
#5 {main} 
2013-03-11 17:59:49 Error: Fatal Error (1): Maximum execution time of 30 seconds exceeded in [...........................\lib\Cake\Model\Datasource\CakeSession. 
php, line 616] 
2013-03-11 17:59:49 Error: [FatalErrorException] Maximum execution time of 30 seconds exceeded 
Request URL: /patrick/chima-rms/chimarms/checks/printCheck/28 
Stack Trace: 
#0 ...........................\lib\Cake\Error\ErrorHandler.php(184): ErrorHandler::handleFatalError(1, 'Maximum executi...', 'C:\www\patrick\...', 616) 
#1 [internal function]: ErrorHandler::handleError(1, 'Maximum executi...', 'C:\www\patrick\...', 616, Array) 
#2 ...........................\lib\Cake\Core\App.php(927): call_user_func('ErrorHandler::h...', 1, 'Maximum executi...', 'C:\www\patrick\...', 616, Array) 
#3 ...........................\lib\Cake\Core\App.php(900): App::_checkFatalError() 
#4 [internal function]: App::shutdown() 
#5 {main} 
2013-03-11 18:00:11 Error: Fatal Error (1): Maximum execution time of 30 seconds exceeded in [...........................\lib\Cake\Utility\Debugger.php, line 47 
3] 
2013-03-11 18:00:11 Error: [FatalErrorException] Maximum execution time of 30 seconds exceeded 
Request URL: /patrick/chima-rms/chimarms/checks/printCheck/28 
Stack Trace: 
#0 ...........................\lib\Cake\Error\ErrorHandler.php(184): ErrorHandler::handleFatalError(1, 'Maximum executi...', 'C:\www\patrick\...', 473) 
#1 [internal function]: ErrorHandler::handleError(1, 'Maximum executi...', 'C:\www\patrick\...', 473, Array) 
#2 ...........................\lib\Cake\Core\App.php(927): call_user_func('ErrorHandler::h...', 1, 'Maximum executi...', 'C:\www\patrick\...', 473, Array) 
#3 ...........................\lib\Cake\Core\App.php(900): App::_checkFatalError() 
#4 [internal function]: App::shutdown() 
#5 {main} 

왜?


내가 사용하고 있습니다 :

  • CakePHP의 2.3.0
  • PostgreSQL의 9.2
  • PHP 5.3.9
  • 아파치 2.2
  • 윈도우 7 64
+0

"작동하지 않습니다." 오류 메시지를 보내주십시오. 세부 사항이 많을수록 좋습니다. – digitaljoel

+0

이제 더 자세한 내용을 추가하겠습니다. –

+0

쿼리가 다른 환경에서 얼마나 걸리나요? – digitaljoel

답변

2

기본적으로 max PHP 스크립트의 imum 실행 시간은 30 초입니다. 이 SQL을 실행하면 데이터를 반환하고 처리하는 데 걸리는 시간이 30 초를 넘습니다. 최대 실행 시간을 늘리거나 쿼리를 최적화해야합니다. 시도해보십시오 set_time_limit (0); 스크립트 상단에 있습니다.