Mautic Contacts API Batch update issue

Your software
My PHP version is :7.4.23
My MySQL/MariaDB version is (delete as applicable): MySQL/MariaDB version : 10.3.34-MariaDB-0ubuntu0.20.04.1

These errors are showing in the Mautic log : {“errors”:[{“message”:“Looks like I encountered an error (error #500). If I do it again, please report me to the system administrator!”,“code”:500,“type”:null}]}

Your problem
My problem is : While updating contact using batch update API all fields are not get update with 100 percent accuracy and get above error frequently but in case of single edit API it work with 100 percent accuracy i.e. all fields are update properly but it take lon time to complete this activity if we want to update say 10 lac record then as per our observation it will take at least 1 month to complete.

We are unable to trace the root cause from the error log. Please guide us on the same on urgent basis.

Steps I have tried to fix the problem :