Hi @Hatim Johar ,
Looks like the threshold of the resource ProcessVirtualBytes has been exceeded. To alleviate this problem, you should modify your code so that it does not exceed the resource threshold.
You could see the resource values here: https://learn.microsoft.com/en-us/previous-versions/office/developer/sharepoint-2010/gg615462(v=office.14)?redirectedfrom=MSDN#resources-measured
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.