YetiForceCompany / YetiForceCRM

Our team created for you one of the most innovative CRM systems that supports mainly business processes and allows for customization according to your needs. Be ahead of your competition and implement YetiForce!
https://yetiforce.com
Other
1.74k stars 749 forks source link

[bug] Error while permanent delete of record #17290

Closed JEEVAN28 closed 1 year ago

JEEVAN28 commented 1 year ago

🐞 bug report

⁉️ Describe the bug

When trying to delete record permanent system hangs. Record does not get deleted.

🔥 How to trigger the error

Steps to reproduce the behavior:

  1. Go to 'any contact'
  2. Click on 'delete permanent record'

👎 Record not deleted and system remains hang, only on Page Refresh system start working again

👍 Record should get deleted

👷

📝 PHP/Apache/Nginx/Browser/CRM Logs

When checked logs I found below error

2023-09-29 13:26:34.8582 [error][] - SQLSTATE[HY000]: General error: 1615 Prepared statement needs to be re-prepared The SQL being executed was: DELETE FROM vtiger_crmentity WHERE crmid=312052 PDOException: SQLSTATE[HY000]: General error: 1615 Prepared statement needs to be re-prepared in /www/wwwroot/default/crm/yf/vendor/yetiforce/yii2/db/Command.php:1302 Stack trace:

0 /www/wwwroot/default/crm/yf/vendor/yetiforce/yii2/db/Command.php(1302): PDOStatement->execute()

1 /www/wwwroot/default/crm/yf/vendor/yetiforce/yii2/db/Command.php(1102): yii\db\Command->internalExecute()

2 /www/wwwroot/default/crm/yf/modules/Vtiger/models/Record.php(709): yii\db\Command->execute()

3 /www/wwwroot/default/crm/yf/modules/Vtiger/actions/Delete.php(36): Vtiger_Record_Model->delete()

4 /www/wwwroot/default/crm/yf/include/main/WebUI.php(188): Vtiger_Delete_Action->process()

5 /www/wwwroot/default/crm/yf/index.php(26): Vtiger_WebUI->process()

6 {main}

Next yii\db\Exception: SQLSTATE[HY000]: General error: 1615 Prepared statement needs to be re-prepared The SQL being executed was: DELETE FROM vtiger_crmentity WHERE crmid=312052 in /www/wwwroot/default/crm/yf/vendor/yetiforce/yii2/db/Schema.php:676 Stack trace:

0 /www/wwwroot/default/crm/yf/vendor/yetiforce/yii2/db/Command.php(1307): yii\db\Schema->convertException()

1 /www/wwwroot/default/crm/yf/vendor/yetiforce/yii2/db/Command.php(1102): yii\db\Command->internalExecute()

2 /www/wwwroot/default/crm/yf/modules/Vtiger/models/Record.php(709): yii\db\Command->execute()

3 /www/wwwroot/default/crm/yf/modules/Vtiger/actions/Delete.php(36): Vtiger_Record_Model->delete()

4 /www/wwwroot/default/crm/yf/include/main/WebUI.php(188): Vtiger_Delete_Action->process()

5 /www/wwwroot/default/crm/yf/index.php(26): Vtiger_WebUI->process()

6 {main}

Additional Information: Array ( [0] => HY000 [1] => 1615 [2] => Prepared statement needs to be re-prepared ) -->

Kindly advice what needs to be done Jeevan Pendhari

JEEVAN28 commented 1 year ago

I searched further on Google and found below changes

SET GLOBAL table_definition_cache = 1024

I did this and then above issue is resolved. Please assist is it ok to set this value from performance point of view