mirror of
https://github.com/SuiteCRM/SuiteCRM.git
synced 2026-03-02 19:16:58 -05:00
Critical issue - Database failure #3806
Labels
No labels
Area: API
Area: Campaigns
Area: Cases
Area: Clean Up
Area: Clean Up: Performance
Area: Dashlets
Area: Databases
Area: Developer Tools
Area: Elasticsearch
Area: Elasticsearch
Area: Emails
Area: Emails:Campaigns
Area: Emails:Cases
Area: Emails:Compose
Area: Emails:Config
Area: Emails:Templates
Area: Environment
Area: Installation
Area: Language
Area: Mobile
Area: Module
Area: PDFs
Area: PHP8
Area: Reports
Area: Studio
Area: Styling
Area: Upgrading
Area: Workflow
Area:Activity Stream
Area:Calls
Area:Import
Area:Projects
Area:Search
Area:Surveys
Area:Themes
Area:Users
Branch:Hotfix
Good First Issue
Hacktoberfest
Help Wanted
PR:Community Contribution
PR:Type:Enhancement
Priority:Critical
Priority:Important
Priority:Moderate
Severity: Major
Severity: Minor
Severity: Moderate
Status: Requires Code Review
Status: Requires Updates
Status: Stale
Status: Team Investigating
Status:Assessed
Status:Fix Proposed
Status:Needs Assessed
Status:Requires Automated Tests
Type: Bug
Type:Deprecated
Type:Discussion
Type:Duplicate
Type:Invalid
Type:Question
Type:Suggestion
Type:Suggestion
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/SuiteCRM-SuiteCRM#3806
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @TelevicDominiek on GitHub (Jun 27, 2019).
Hi,
Our key user succeeded in generating a (repeating!) critical issue ("Database failure") and we were able to reproduce it. We also have workaround to fix this issue (seems to do with browser cache cleanup), but this is so time-intensive that a core fix is needed rather urgently.
SuiteCRM Version

Scenario description
We open a random lead and scroll to the bottom: everything looks fine.
We open the tab "Activities" and "History"
We create a new note in "History"
We edit the existing activity by clicking on the button "Edit" --> form opens, we click save, we retun to the leads form... And there comes a visible database failure!
Only possible fix
The only way to get rid of such an error --> Clear the complete browser cache.
URGENCY
A fix for this issue is needed rather urgency. We cannot expect our users to have to clear their browser cache every 30 minutes... Please let this know if this would already be fixed in a hotfix or upgrade of SuiteCRM.
SuiteCRM.log
`Thu Jun 27 14:27:38 2019 [22600][ce4dc1fc-9c02-bea0-8432-5cc2f80b9f15][FATAL] Error retrieving Lead list: Query Failed:DECLARE @topCount INT SET @topCount = 10 SELECT TOP (@topCount) * FROM( select ROW_NUMBER() OVER ( order by date_entered desc) AS row_number, * FROM ((select meetings.id , meetings.assigned_user_id , meetings.name , meetings.status , N' ' contact_name , N' ' contact_id , meetings.date_modified , meetings.date_entered , meetings.date_end as date_due , jt1.user_name assigned_user_name , jt1.created_by assigned_user_name_owner , N'users' assigned_user_name_mod, 0 reply_to_status , N' ' contact_name_owner , N' ' contact_name_mod , meetings.parent_id , meetings.parent_type , N' ' filename , meetings.recurring_source , N' ' assigned_user_owner , N' ' assigned_user_mod , meetings.created_by , N'meetings' panel_name, null date_end, null category_id from meetings left join meetings_cstm on meetings.id = meetings_cstm.id_c left join users jt1 on meetings.assigned_user_id=jt1.id and jt1.deleted=0
and jt1.deleted=0 inner join meetings_leads on meetings.id=meetings_leads.meeting_id and meetings_leads.lead_id=N'6480da0f-44fe-2502-d846-5cd29b643e68' and meetings_leads.deleted=0
where ((meetings.status=N'held' or meetings.status=N'not held')) and meetings.deleted=0) union all ( select meetings.id , meetings.assigned_user_id , meetings.name , meetings.status , N' ' contact_name , N' ' contact_id , meetings.date_modified , meetings.date_entered , meetings.date_end as date_due , jt1.user_name assigned_user_name , jt1.created_by assigned_user_name_owner , N'users' assigned_user_name_mod, 0 reply_to_status , N' ' contact_name_owner , N' ' contact_name_mod , meetings.parent_id , meetings.parent_type , N' ' filename , meetings.recurring_source , N' ' assigned_user_owner , N' ' assigned_user_mod , meetings.created_by , N'oldmeetings' panel_name, null date_end, null category_id from meetings left join meetings_cstm on meetings.id = meetings_cstm.id_c left join users jt1 on meetings.assigned_user_id=jt1.id and jt1.deleted=0
and jt1.deleted=0 where ( meetings.parent_id = N'6480da0f-44fe-2502-d846-5cd29b643e68'
and meetings.parent_type = N'leads' and meetings.id not in ( select meeting_id from meetings_leads ) and (meetings.status=N'held' or meetings.status=N'not held')) and meetings.deleted=0 ) union all ( select tasks.id , tasks.assigned_user_id , tasks.name , tasks.status , ltrim(rtrim(isnull(contacts.first_name,'')+N' '+isnull(contacts.last_name,''))) contact_name , tasks.contact_id , tasks.date_modified , tasks.date_entered , null date_due, jt1.user_name assigned_user_name , jt1.created_by assigned_user_name_owner , N'users' assigned_user_name_mod, 0 reply_to_status , N' ' contact_name_owner , N' ' contact_name_mod , tasks.parent_id , tasks.parent_type , N' ' filename , null recurring_source, N' ' assigned_user_owner , N' ' assigned_user_mod , tasks.created_by , N'tasks' panel_name, tasks.date_end , null category_id from tasks left join tasks_cstm on tasks.id = tasks_cstm.id_c left join contacts contacts on tasks.contact_id=contacts.id and contacts.deleted=0
and contacts.deleted=0 left join users jt1 on tasks.assigned_user_id=jt1.id and jt1.deleted=0
and jt1.deleted=0 inner join leads tasks_rel on tasks.parent_id=tasks_rel.id and tasks_rel.deleted=0
and tasks.parent_type = N'leads'
where ( tasks.parent_id=N'6480da0f-44fe-2502-d846-5cd29b643e68' and (tasks.status=N'completed' or tasks.status=N'deferred')) and tasks.deleted=0 ) union all ( select calls.id , calls.assigned_user_id , calls.name , calls.status , N' ' contact_name , N' ' contact_id , calls.date_modified , calls.date_entered , calls.date_end as date_due , jt1.user_name assigned_user_name , jt1.created_by assigned_user_name_owner , N'users' assigned_user_name_mod, 0 reply_to_status , N' ' contact_name_owner , N' ' contact_name_mod , calls.parent_id , calls.parent_type , N' ' filename , calls.recurring_source , N' ' assigned_user_owner , N' ' assigned_user_mod , calls.created_by , N'calls' panel_name, null date_end, null category_id from calls left join users jt1 on calls.assigned_user_id=jt1.id and jt1.deleted=0
and jt1.deleted=0 inner join calls_leads on calls.id=calls_leads.call_id and calls_leads.lead_id=N'6480da0f-44fe-2502-d846-5cd29b643e68' and calls_leads.deleted=0
where ((calls.status=N'held' or calls.status=N'not held')) and calls.deleted=0 ) union all ( select calls.id , calls.assigned_user_id , calls.name , calls.status , N' ' contact_name , N' ' contact_id , calls.date_modified , calls.date_entered , calls.date_end as date_due , jt1.user_name assigned_user_name , jt1.created_by assigned_user_name_owner , N'users' assigned_user_name_mod, 0 reply_to_status , N' ' contact_name_owner , N' ' contact_name_mod , calls.parent_id , calls.parent_type , N' ' filename , calls.recurring_source , N' ' assigned_user_owner , N' ' assigned_user_mod , calls.created_by , N'oldcalls' panel_name, null date_end, null category_id from calls left join users jt1 on calls.assigned_user_id=jt1.id and jt1.deleted=0
and jt1.deleted=0 where ( calls.parent_id = N'6480da0f-44fe-2502-d846-5cd29b643e68'
and calls.parent_type = N'leads' and calls.id not in ( select call_id from calls_leads ) and (calls.status=N'held' or calls.status=N'not held')) and calls.deleted=0 ) union all ( select notes.id , notes.assigned_user_id , notes.name , N' ' status , ltrim(rtrim(isnull(contacts.first_name,'')+N' '+isnull(contacts.last_name,''))) contact_name , notes.contact_id , notes.date_modified , notes.date_entered , null date_due, jt1.user_name assigned_user_name , jt1.created_by assigned_user_name_owner , N'users' assigned_user_name_mod, 0 reply_to_status , N' ' contact_name_owner , N' ' contact_name_mod , notes.parent_id , notes.parent_type , notes.filename , null recurring_source, N' ' assigned_user_owner , N' ' assigned_user_mod , notes.created_by , N'notes' panel_name, null date_end, null category_id from notes left join notes_cstm on notes.id = notes_cstm.id_c left join contacts contacts on notes.contact_id=contacts.id and contacts.deleted=0
and contacts.deleted=0 left join users jt1 on notes.assigned_user_id=jt1.id and jt1.deleted=0
and jt1.deleted=0 inner join leads notes_rel on notes.parent_id=notes_rel.id and notes_rel.deleted=0
and notes.parent_type = N'leads'
where ( notes.parent_id=N'6480da0f-44fe-2502-d846-5cd29b643e68') and notes.deleted=0 ) union all ( select emails.id , emails.assigned_user_id , emails.name , emails.status , N' ' contact_name , N' ' contact_id , emails.date_modified , emails.date_entered , null date_due, jt0.user_name assigned_user_name , jt0.created_by assigned_user_name_owner , N'users' assigned_user_name_mod, emails.reply_to_status , N' ' contact_name_owner , N' ' contact_name_mod , emails.parent_id , emails.parent_type , N' ' filename , null recurring_source, N' ' assigned_user_owner , N' ' assigned_user_mod , emails.created_by , N'emails' panel_name, null date_end, emails.category_id from emails left join users jt0 on emails.assigned_user_id=jt0.id and jt0.deleted=0
and jt0.deleted=0 inner join emails_beans on emails.id=emails_beans.email_id and emails_beans.bean_id=N'6480da0f-44fe-2502-d846-5cd29b643e68' and emails_beans.deleted=0
and emails_beans.bean_module = N'leads'
where emails.deleted=0 ) union all ( select emails.id , emails.assigned_user_id , emails.name , emails.status , N' ' contact_name , N' ' contact_id , emails.date_modified , emails.date_entered , null date_due, jt0.user_name assigned_user_name , jt0.created_by assigned_user_name_owner , N'users' assigned_user_name_mod, emails.reply_to_status , N' ' contact_name_owner , N' ' contact_name_mod , emails.parent_id , emails.parent_type , N' ' filename , null recurring_source, N' ' assigned_user_owner , N' ' assigned_user_mod , emails.created_by , N'linkedemails' panel_name, null date_end, emails.category_id from emails left join users jt0 on emails.assigned_user_id=jt0.id and jt0.deleted=0
and jt0.deleted=0 join (select distinct email_id from emails_email_addr_rel eear
Thu Jun 27 14:27:38 2019 [22600][ce4dc1fc-9c02-bea0-8432-5cc2f80b9f15][DEBUG] Hook called: ::server_round_trip
Thu Jun 27 14:27:38 2019 [22600][ce4dc1fc-9c02-bea0-8432-5cc2f80b9f15][DEBUG] Calling Mssql::disconnect()
Thu Jun 27 14:27:38 2019 [22600][ce4dc1fc-9c02-bea0-8432-5cc2f80b9f15][FATAL] Exception handling in D:\home\site\wwwroot\include\MVC\Controller\SugarController.php:400
Thu Jun 27 14:27:38 2019 [22600][ce4dc1fc-9c02-bea0-8432-5cc2f80b9f15][FATAL] Exception in Controller: Database failure. Please refer to suitecrm.log for details.
Thu Jun 27 14:27:38 2019 [22600][ce4dc1fc-9c02-bea0-8432-5cc2f80b9f15][FATAL] backtrace:
#0 D:\home\site\wwwroot\include\database\DBManager.php(353): sugar_die('Database failur...')
#1 D:\home\site\wwwroot\include\database\DBManager.php(328): DBManager->registerError('Error retrievin...', 'Error retrievin...', true)
#2 D:\home\site\wwwroot\include\database\SqlsrvManager.php(235): DBManager->checkError('Error retrievin...', true)`
@gunnicom commented on GitHub (Jun 27, 2019):
"[Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Invalid column name 'date_end'"
Maybe related: https://github.com/salesagility/SuiteCRM/issues/7267
@Dillon-Brown commented on GitHub (Jun 27, 2019):
Closing as a duplicate of #7267. Thanks for the detailed report @TelevicDominiek, I'm now able to replicate this and will raise the priority of #7267.