case number being re-used

Hi we are using a slightly older version of SugarCRM 6.5.17 (Build 1220). We have an intermittent fault where a user emails, most times it creates a Case with a new Case number sometimes it doesn't create a Case other times it uses a pre-existing case number. I have grepped log file using 'cases_accounts':

/usr/share/sugarcrm/sugarcrm_12_03_18_3.log:Mon Dec  3 16:19:09 2018 [11369][1][ERROR] Unable to find relationship cases_accounts

/usr/share/sugarcrm/sugarcrm_12_03_18_3.log:Mon Dec  3 16:19:09 2018 [11369][1][FATAL] cases_accounts for cases_accounts failed to load

/usr/share/sugarcrm/sugarcrm_12_03_18_3.log:Mon Dec  3 16:19:09 2018 [11369][1][FATAL] Failed to load relationship cases_accounts while saving Cases

/usr/share/sugarcrm/sugarcrm_12_03_18_3.log:Mon Dec  3 16:19:09 2018 [11369][1][ERROR] Unable to find relationship cases_accounts

/usr/share/sugarcrm/sugarcrm_12_03_18_3.log:Mon Dec  3 16:19:09 2018 [11369][1][FATAL] cases_acco7636ccounts_idb for cases_accounts failed to load

/usr/share/sugarcrm/sugarcrm_12_03_18_3.log:Mon Dec  3 16:19:09 2018 [11369][1][ERROR] Unable to find relationship cases_accounts

/usr/share/sugarcrm/sugarcrm_12_03_18_3.log:Mon Dec  3 16:19:09 2018 [11369][1][FATAL] cases_accounts for cases_accounts failed to load

/usr/share/sugarcrm/sugarcrm_12_03_18_3.log:Mon Dec  3 16:19:09 2018 [11369][1][FATAL] Failed to load relationship cases_accounts while saving Cases

We have tried rebuilding the relationships but haven't done a repair as yet and prefer not to.

Have tested the email connection and the send test email works fine.

 

We are looking at upgrading 1st half 2019 but would like to try and resolve this before hand.

Any information on this would be fantastic!

Cheers,

Steve