- Posts: 83
- Thank you received: 7
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
SELECT * FROM "lime_template_configuration" "t" WHERE template_name='fruity_twen
- mferraz
- Topic Author
- Offline
- Premium Member
Less
More
5 months 5 days ago #252493
by mferraz
SELECT * FROM "lime_template_configuration" "t" WHERE template_name='fruity_twen was created by mferraz
Please help us help you and fill in where relevant:
Your LimeSurvey version: 6.3.6+231120
Own server or LimeSurvey hosting:
Survey theme/template:
==================
(Write here your question/remark)
Hi.
We're getting a lot of PostgreSQL resource usage (quite a few processes) with only this query:
SELECT * FROM "lime_template_configuration" "t" WHERE template_name='fruity_twentythree' AND sid IS NULL AND gsid IS NULL ORDER BY "t"."template_name" LIMIT 1
When I try this query myself, I don't get any row.
Your LimeSurvey version: 6.3.6+231120
Own server or LimeSurvey hosting:
Survey theme/template:
==================
(Write here your question/remark)
Hi.
We're getting a lot of PostgreSQL resource usage (quite a few processes) with only this query:
SELECT * FROM "lime_template_configuration" "t" WHERE template_name='fruity_twentythree' AND sid IS NULL AND gsid IS NULL ORDER BY "t"."template_name" LIMIT 1
When I try this query myself, I don't get any row.
Please Log in to join the conversation.
- mferraz
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 83
- Thank you received: 7
5 months 5 days ago #252494
by mferraz
Replied by mferraz on topic SELECT * FROM "lime_template_configuration" "t" WHERE template_name='fruity_twen
ok, I think I'm getting the cause:
CException
Invalid fruity_twentythree template directory
/opt/limesurvey/application/models/Template.php(426)
414
415 /**
416 * This function returns the complete URL path to a given template name
417 *
418 * @param string $sTemplateName
419 * @return string template url
420 */
421 public static function getTemplateURL($sTemplateName = "")
422 {
423 $sTemplateName = self::templateNameFilter($sTemplateName);
424 // Make sure template name is valid
425 if (!self::checkIfTemplateExists($sTemplateName)) {
426 throw new \CException("Invalid {$sTemplateName} template directory");
427 }
428
429 static $aTemplateUrl = array();
430 if (isset($aTemplateUrl[$sTemplateName])) {
431 return $aTemplateUrl[$sTemplateName];
432 }
433
434 $oTemplate = self::model()->findByPk($sTemplateName);
435
436 if (is_object($oTemplate)) {
437 Yii::import('application.helpers.SurveyThemeHelper');
438 if (SurveyThemeHelper::isStandardTemplate($sTemplateName)) {
Stack Trace
#0
– /opt/limesurvey/application/helpers/common_helper.php(3115): Template::getTemplateURL("fruity_twentythree")
3110 * @param mixed $sTemplateName
3111 * @return string
3112 */
3113 function getTemplateURL($sTemplateName)
3114 {
3115 return Template::getTemplateURL($sTemplateName);
3116 }
3117
3118 /**
3119 * Return an array of subquestions for a given sid/qid
3120 *
#1
– /opt/limesurvey/application/helpers/replacements_helper.php(115): getTemplateURL("fruity_twentythree")
110 $templatename = $thissurvey;
111 } else {
112 $templatename = App()->getConfig('defaulttheme');
113 }
114 if (!isset($templateurl)) {
115 $templateurl = getTemplateURL($templatename) . "/";
116 }
117
118 /**
119 * Template css/js files from the template config files are loaded.
120 * It use the asset manager (so user never need to empty the cache, even if template is updated)
#2
– /opt/limesurvey/application/helpers/expressions/em_manager_helper.php(3340): templatereplace("{SID}")
3335 'jsName' => '',
3336 'readWrite' => 'N',
3337 ];
3338 }
3339 /* Add the core replacement before question code : needed if use it in equation , use SID to never send error */
3340 templatereplace("{SID}");
3341
3342 // Since building array of allowable answers, need to know preset values for certain question types
3343 $presets = [];
3344 $presets = [ //GENDER drop-down list
3345 'M' => $this->gT("Male"),
#3
+ /opt/limesurvey/application/helpers/expressions/em_manager_helper.php(4539): LimeExpressionManager->setVariableAndTokenMappingsForExpressionManager(172562)
#4
+ /opt/limesurvey/application/controllers/SurveyAdministrationController.php(144): LimeExpressionManager::StartProcessingPage(false, true)
#5
+ /opt/limesurvey/vendor/yiisoft/yii/framework/web/actions/CInlineAction.php(49): SurveyAdministrationController->actionView()
#6
+ /opt/limesurvey/vendor/yiisoft/yii/framework/web/CController.php(308): CInlineAction->runWithParams(array("iSurveyID" => "172562"))
#7
+ /opt/limesurvey/vendor/yiisoft/yii/framework/web/filters/CFilterChain.php(134): CController->runAction(CInlineAction)
#8
+ /opt/limesurvey/vendor/yiisoft/yii/framework/web/CController.php(291): CFilterChain->run()
#9
+ /opt/limesurvey/vendor/yiisoft/yii/framework/web/CController.php(265): CController->runActionWithFilters(CInlineAction, array("postOnly + copy"))
#10
+ /opt/limesurvey/application/controllers/LSBaseController.php(145): CController->run("view")
#11
+ /opt/limesurvey/vendor/yiisoft/yii/framework/web/CWebApplication.php(282): LSBaseController->run("view")
#12
+ /opt/limesurvey/vendor/yiisoft/yii/framework/web/CWebApplication.php(141): CWebApplication->runController("surveyAdministration/view")
#13
+ /opt/limesurvey/vendor/yiisoft/yii/framework/base/CApplication.php(185): CWebApplication->processRequest()
#14
+ /opt/limesurvey/index.php(161): CApplication->run()
CException
Invalid fruity_twentythree template directory
/opt/limesurvey/application/models/Template.php(426)
414
415 /**
416 * This function returns the complete URL path to a given template name
417 *
418 * @param string $sTemplateName
419 * @return string template url
420 */
421 public static function getTemplateURL($sTemplateName = "")
422 {
423 $sTemplateName = self::templateNameFilter($sTemplateName);
424 // Make sure template name is valid
425 if (!self::checkIfTemplateExists($sTemplateName)) {
426 throw new \CException("Invalid {$sTemplateName} template directory");
427 }
428
429 static $aTemplateUrl = array();
430 if (isset($aTemplateUrl[$sTemplateName])) {
431 return $aTemplateUrl[$sTemplateName];
432 }
433
434 $oTemplate = self::model()->findByPk($sTemplateName);
435
436 if (is_object($oTemplate)) {
437 Yii::import('application.helpers.SurveyThemeHelper');
438 if (SurveyThemeHelper::isStandardTemplate($sTemplateName)) {
Stack Trace
#0
– /opt/limesurvey/application/helpers/common_helper.php(3115): Template::getTemplateURL("fruity_twentythree")
3110 * @param mixed $sTemplateName
3111 * @return string
3112 */
3113 function getTemplateURL($sTemplateName)
3114 {
3115 return Template::getTemplateURL($sTemplateName);
3116 }
3117
3118 /**
3119 * Return an array of subquestions for a given sid/qid
3120 *
#1
– /opt/limesurvey/application/helpers/replacements_helper.php(115): getTemplateURL("fruity_twentythree")
110 $templatename = $thissurvey;
111 } else {
112 $templatename = App()->getConfig('defaulttheme');
113 }
114 if (!isset($templateurl)) {
115 $templateurl = getTemplateURL($templatename) . "/";
116 }
117
118 /**
119 * Template css/js files from the template config files are loaded.
120 * It use the asset manager (so user never need to empty the cache, even if template is updated)
#2
– /opt/limesurvey/application/helpers/expressions/em_manager_helper.php(3340): templatereplace("{SID}")
3335 'jsName' => '',
3336 'readWrite' => 'N',
3337 ];
3338 }
3339 /* Add the core replacement before question code : needed if use it in equation , use SID to never send error */
3340 templatereplace("{SID}");
3341
3342 // Since building array of allowable answers, need to know preset values for certain question types
3343 $presets = [];
3344 $presets = [ //GENDER drop-down list
3345 'M' => $this->gT("Male"),
#3
+ /opt/limesurvey/application/helpers/expressions/em_manager_helper.php(4539): LimeExpressionManager->setVariableAndTokenMappingsForExpressionManager(172562)
#4
+ /opt/limesurvey/application/controllers/SurveyAdministrationController.php(144): LimeExpressionManager::StartProcessingPage(false, true)
#5
+ /opt/limesurvey/vendor/yiisoft/yii/framework/web/actions/CInlineAction.php(49): SurveyAdministrationController->actionView()
#6
+ /opt/limesurvey/vendor/yiisoft/yii/framework/web/CController.php(308): CInlineAction->runWithParams(array("iSurveyID" => "172562"))
#7
+ /opt/limesurvey/vendor/yiisoft/yii/framework/web/filters/CFilterChain.php(134): CController->runAction(CInlineAction)
#8
+ /opt/limesurvey/vendor/yiisoft/yii/framework/web/CController.php(291): CFilterChain->run()
#9
+ /opt/limesurvey/vendor/yiisoft/yii/framework/web/CController.php(265): CController->runActionWithFilters(CInlineAction, array("postOnly + copy"))
#10
+ /opt/limesurvey/application/controllers/LSBaseController.php(145): CController->run("view")
#11
+ /opt/limesurvey/vendor/yiisoft/yii/framework/web/CWebApplication.php(282): LSBaseController->run("view")
#12
+ /opt/limesurvey/vendor/yiisoft/yii/framework/web/CWebApplication.php(141): CWebApplication->runController("surveyAdministration/view")
#13
+ /opt/limesurvey/vendor/yiisoft/yii/framework/base/CApplication.php(185): CWebApplication->processRequest()
#14
+ /opt/limesurvey/index.php(161): CApplication->run()
Please Log in to join the conversation.
- rjpinto
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
4 months 3 weeks ago #253008
by rjpinto
Replied by rjpinto on topic SELECT * FROM "lime_template_configuration" "t" WHERE template_name='fruity_twen
Actually just updated to latest version 6.3.8 and also noticed that the CPU was under heavy usage by the postgresql database. After enabling the logging of statements in the database it looks like clicking on a survey is generating a endless loop of these database queries, until the php_fpm timeout kicks in. Also I noticed that I no longer can see the themes that come with the ZIP file in the web interface although the files are present in the folder structure.
Please Log in to join the conversation.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13648
- Thank you received: 2491
4 months 3 weeks ago #253024
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic SELECT * FROM "lime_template_configuration" "t" WHERE template_name='fruity_twen
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Please Log in to join the conversation.