SuiteCRM unresponsive when converting a project template to a project

Hello,

I would greatly appreciate any assistance in the following issue we are facing:

SuiteCRM version 7.9.7, Plesk 12.5.30 Update #74, CentOS Linux 7.4.1708 (Core), PHP version 7.0.27, MySQL version 5.5.56.

The issue isn’t version specific. We were facing the exact same behavior with earlier versions of SuiteCRM. Same if we set PHP version to 5.x.

We created some project templates. Every time we try to convert a project template into a project, the CRM will stop responding for several minutes. In almost all cases it will finally crash with an HTTP 500 error, “[domain] is currently unable to handle this request”. Some times, the project will be created with the crm being unresponsive in the meantime.

Performance-wise we have assigned sufficient resources to the crm and other than that all other actions are executed without delays.

So, I went ahead and setup a new Pleask instance with just one domain for the CRM (a clone of the production CRM system). and I didn’t install many modules to keep the resource usage as low as possible.

The issue is present on the test system as well. The difference is that the crash happens almost instantly.

These are the specifications of the test system:

SuiteCRM version 7.9.7, Plesk Onyx Version 17.5.3 Update #40, CentOS Linux 7.4.1708 (Core)‬, PHP version 7.2.2, MySQL version 5.5.56.

I tried to replicate the issue and I show that when I choose to convert the template to a project a lot of entries are looged to the suiteCRM.log file. This error appears a lot:

Tue Feb 13 14:22:19 2018 [3855][7a1733f4-4462-155d-8e89-57f4f0dbc9e7][DEBUG] SugarBean[ProjectTask].load_relationships, Loading relationship (project_name_link).
Tue Feb 13 14:22:19 2018 [3855][7a1733f4-4462-155d-8e89-57f4f0dbc9e7][ERROR] Unable to get proper side for link project_name_link
Tue Feb 13 14:22:19 2018 [3855][7a1733f4-4462-155d-8e89-57f4f0dbc9e7][ERROR] Unable to get proper side for link project_name_link
Tue Feb 13 14:22:19 2018 [3855][7a1733f4-4462-155d-8e89-57f4f0dbc9e7][ERROR] Unable to get proper side for link project_name_link

I googled a bit and I found that others face this issue as well. I tried the work around suggested by a user (reset the business hours is Advanced OpenAdmin --> AOD Settings) but it didn’t work for us.

This is an important work flow for us and as I said in the beginning we would appreciate any help.

Best Regards,
John

Hello,

Thanks for the SuiteCRM logs, but a 500 error usually will hit the web server logs before the SuiteCRM logs. Do you have access to them when the error happens?

Hello samus-anan,

thank you very much for your response.

Here are the relative logs from the web server:

[Tue Feb 13 15:05:41.382630 2018] [fcgid:warn] [pid 55430:tid 139938255288064] [client 10.2.1.182:43296] mod_fcgid: stderr: PHP Warning:  Use of undefined constant JSON_LOOSE_TYPE - assumed 'JSON_LOOSE_TYPE' (this will throw an Error in a future version of PHP) in /var/www/vhosts/[subscription]/[domain]/crm/SuiteCRM/include/utils.php on line 3992, referer: http://[domain]/index.php?module=Home&action=index
[Tue Feb 13 15:05:49.183540 2018] [fcgid:warn] [pid 60617:tid 139938434033408] [client 10.2.1.182:43324] mod_fcgid: stderr: PHP Warning:  Invalid argument supplied for foreach() in /var/www/vhosts/[subscription]/[domain]/crm/SuiteCRM/modules/AM_ProjectTemplates/views/view.ganttchart.php on line 108, referer: http://[domain]/index.php?module=AM_ProjectTemplates&action=index&parentTab=All
[Tue Feb 13 15:06:49.266209 2018] [fcgid:warn] [pid 55425:tid 139938221717248] [client 10.2.1.182:43366] mod_fcgid: stderr: PHP Fatal error:  Maximum execution time of 30 seconds exceeded in /var/www/vhosts/[subscription]/[domain]/crm/SuiteCRM/modules/AOD_Index/Lib/Zend/Search/Lucene/Storage/Directory/Filesystem.php on line 161, referer: http://[domain]/index.php?module=AM_ProjectTemplates&offset=1&stamp=1518527141023742700&return_module=AM_ProjectTemplates&action=view_GanttChart&record=485488b9-cea7-06d7-90ba-5a0d7af03474
[Tue Feb 13 15:06:50.262548 2018] [fcgid:warn] [pid 60617:tid 139938347607808] [client 10.2.1.182:43372] mod_fcgid: stderr: PHP Warning:  Use of undefined constant JSON_LOOSE_TYPE - assumed 'JSON_LOOSE_TYPE' (this will throw an Error in a future version of PHP) in /var/www/vhosts/[subscription]/[domain]/crm/SuiteCRM/include/utils.php on line 3992, referer: http://[domain]/index.php?module=AM_ProjectTemplates&offset=1&stamp=1518527141023742700&return_module=AM_ProjectTemplates&action=view_GanttChart&record=485488b9-cea7-06d7-90ba-5a0d7af03474
[Tue Feb 13 15:06:50.262850 2018] [fcgid:warn] [pid 60617:tid 139938347607808] (32)Broken pipe: [client 10.2.1.182:43372] mod_fcgid: ap_pass_brigade failed in handle_request_ipc function, referer: [domain]/index.php?module=AM_ProjectTemplates&offset=1&stamp=1518527141023742700&return_module=AM_ProjectTemplates&action=view_GanttChart&record=485488b9-cea7-06d7-90ba-5a0d7af03474

In the log entries above I replaced the Plesk subscription with [subscription] and the crm domain with [domain] respectively. If you want to check the full log, I can share it via PM/ email.

Best Regards,
John

[Tue Feb 13 15:06:49.266209 2018] [fcgid:warn] [pid 55425:tid 139938221717248] [client 10.2.1.182:43366] mod_fcgid: stderr: PHP Fatal error:  Maximum execution time of 30 seconds exceeded in /var/www/vhosts/[subscription]/[domain]/crm/SuiteCRM/modules/AOD_Index/Lib/Zend/Search/Lucene/Storage/Directory/Filesystem.php on line 161, referer: http://[domain]/index.php?module=AM_ProjectTemplates&offset=1&stamp=1518527141023742700&return_module=AM_ProjectTemplates&action=view_GanttChart&record=485488b9-cea7-06d7-90ba-5a0d7af03474

That is the fatal there.

Why AOD is indexing I’m not quite sure. Try turning it off via the Admin Panel in AOD settings and then convert the project template to a project.

Let us know how you get on.

So, from Admin --> Advanced OpenAdmin --> AOD Settings I unchecked the “Enable AOD:”

When I tried to create a new project from the Project Template nothing changed, the crm crashed.

This is the output from web server log:

[Thu Feb 15 15:13:41.392832 2018] [fcgid:warn] [pid 60617:tid 139938322429696] [client 10.2.1.182:48182] mod_fcgid: stderr: PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /var/www/vhosts/[subscription]/[domain]/crm/SuiteCRM/cache/smarty/templates_c/%%F6^F60^F609237E%%_headerModuleList.tpl.php on line 989
[Thu Feb 15 15:13:49.180992 2018] [fcgid:warn] [pid 55430:tid 139938255288064] [client 10.2.1.182:48208] mod_fcgid: stderr: PHP Warning:  Use of undefined constant JSON_LOOSE_TYPE - assumed 'JSON_LOOSE_TYPE' (this will throw an Error in a future version of PHP) in /var/www/vhosts/[subscription]/[domain]/crm/SuiteCRM/include/utils.php on line 3992, referer: [domain]
[Thu Feb 15 15:13:54.681941 2018] [fcgid:warn] [pid 55430:tid 139938238502656] [client 10.2.1.182:48224] mod_fcgid: stderr: PHP Warning:  Invalid argument supplied for foreach() in /var/www/vhosts/[subscription]/[domain]/crm/SuiteCRM/modules/AM_ProjectTemplates/views/view.ganttchart.php on line 108, referer: [domain]index.php?module=AM_ProjectTemplates&action=index&parentTab=All
[Thu Feb 15 15:15:10.491974 2018] [fcgid:warn] [pid 55425:tid 139938442426112] [client 10.2.1.182:48256] mod_fcgid: stderr: PHP Fatal error:  Maximum execution time of 30 seconds exceeded in /var/www/vhosts/[subscription]/[domain]/crm/SuiteCRM/include/HTMLPurifier/HTMLPurifier.standalone.php on line 15136, referer:[domain]/index.php?module=AM_ProjectTemplates&offset=1&stamp=1518700429005840900&return_module=AM_ProjectTemplates&action=view_GanttChart&record=485488b9-cea7-06d7-90ba-5a0d7af03474

Hello,

do you have any updates/are ideas about this issue? Should I submit a bug report on github for further investigation?

Based on this error:

[Wed Mar 14 15:58:58.906226 2018] [fcgid:warn] [pid 53677:tid 140176969910016] [client 10.2.1.182:56906] mod_fcgid: stderr: PHP Fatal error:  Maximum execution time of 30 seconds exceeded in /var/www/vhosts/[subscription]/[domain]/crm/SuiteCRM/modules/AOD_Index/Lib/Zend/Search/Lucene/Storage/Directory/Filesystem.php on line 161, referer:  [domain]/index.php?module=AM_ProjectTemplates&offset=2&stamp=1521035885043083300&return_module=AM_ProjectTemplates&action=view_GanttChart&record=485488b9-cea7-06d7-90ba-5a0d7af03474

I went ahead and set the “max_execution_time” to 0.

Now this the error that appears on the web server log at the time SuiteCRM crashes:

[Thu Mar 15 15:31:35.904615 2018] [core:error] [pid 12338:tid 139757346543360] [client 10.2.1.182:59412] End of script output before headers: index.php, referer: [domain]/index.php?module=AM_ProjectTemplates&offset=2&stamp=1521120627082290700&return_module=AM_ProjectTemplates&action=view_GanttChart&record=485488b9-cea7-06d7-90ba-5a0d7af03474

Any help is appreciated.