Error in log "FAILED TRYING TO EXECUTE ON CONNECTION"


Description

->Customer can see lot of error messages in logs everyday as below :"FAILED TRYING TO EXECUTE ON CONNECTION"

Error seen in sys logs :

"FAILED TRYING TO EXECUTE ON CONNECTION glide.24 (connpid=****): INSERT INTO sys_email (`body`,`headers`,`notification_type`,`body_text`,`subject`,`direct`,`sys_updated_on`,`type`,`uid`,`sys_id`,`sys_updated_by`,`content_type`,`receive_type`,`sys_created_on`,`state`,`sys_created_by`,`sys_mod_count`,`weight`,`message_id`,`error_string`,`deleted`,`mailbox`,`user_id`,`recipients`,`user`) VALUES(?,?,'SMTP','****
Please scroll down for English version

->Checking the node logs further showed that the issue(errors) is only with 4 changes which are being repeated continuously and are old changes. An email reader job is associated to the emails that are already sent out 2-3 months back.

****************************** 
2020-04-27 22:37:31 (450) worker.4 worker.4 txid=***** Starting: Email Ree 
ader.*********, Trigger Type: Interval, Priority: 25, Upgg 
rade Safe: true, Repeat: 2 Minutes 

2020-04-27 22:37:31 (480) worker.4 worker.4 txid=**** Processing 4 emaill 

2020-04-27 22:37:31 (480) worker.4 worker.4 txid=****** Processing email tt 
otal: 4, new: 0, deleted: 0, unread: 4 

2020-04-27 22:37:31 (796) worker.4 worker.4 txid=f2aa5c04db20 SEVERE *** ERROR ** 
** FAILED TRYING TO EXECUTE ON CONNECTION glide.24 (connpid=****): INSERT INTT 
O sys_email (`body`,`headers`,`notification_type`,`body_text`,`subject`,`direct`` 
,`sys_updated_on`,`type`,`uid`,`sys_id`,`sys_updated_by`,`content_type`,`receivee 
_type`,`sys_created_on`,`state`,`sys_created_by`,`sys_mod_count`,`weight`,`messaa 
ge_id`,`error_string`,`deleted`,`mailbox`,`user_id`,`recipients`,`user`) VALUES(( 
?,?,'SMTP',' Please scroll down for English version 

2020-04-27 22:37:31 (881) worker.4 worker.4 txid=****** WARNING *** WARNINN 
G *** Message UID='********' Message-ID='<*************@********.********.service-now.com>' - com.glide.notification.inbound.EmailInsertExcepp 
tion: error inserting email: Error during insert of sys_email (Der Change CHG000 
******* ) : error inserting email: Errorr 
during insert of sys_email (Der Change CHG00***** ist ******) 

2020-04-27 22:37:31 (884) worker.4 worker.4 txid=f2aa5c04db20 Processed 0 emails 
2020-04-27 22:37:31 (886) worker.4 worker.4 txid=f2aa5c04db20 Completed: Email RR 




Release or Environment

NA

Cause

In the notification configuration  related to the email , "X" field(custom field) is added as recipients.

For all the change requests which are in the error logs, instance email ID - 'instance@service-now.com' is added in 'X'.

Resolution


->Instance email ID has to removed from the 'X' custom field to resolve the issue.

Also,the solution to stop the error logs :

1) Deleted the existing outbound emails, so the 4 emails are processed and inserted as inbound emails - easy but not recommended
2) Deleting emails from POP3 server

Additional Information

NA