Please help, I am not sure what is going on.
I have an email service which is processing file attachment.
Yesterday it was almost ready to go to production. I just finalized some test cases. Then I uploaded some data from Production to Sandbox to test email service with real data. After running it with real data (few SObjects have 4000-5000 records) I received a message that my REGEX is too complicated in one of the usages of replaceAll. I tried to apply it on substrings, instead of running on the whole string.
Test is passing fine. But when I am trying to send an email with an attachment I am getting Internal Salesforce.com Errors:
- Usually it is log limits message, even when I put all log filters to NONE.
- One or two times it produced different limits: cpu limit, heap limit etc.
I do not know why it started happening just now. Looks like it is related to the fact that I uploaded a few thousands of records to my Test Env. Is there any sort of daily, or total limits which I might be exceeding ?
10:35:33.884 (23884949323)|SYSTEM_METHOD_EXIT|[120]|System.debug(ANY)
10:35:33.884 (23884956915)|SYSTEM_MODE_EXIT|true
10:35:33.884 (23884968008)|METHOD_EXIT|[547]|01pc00000006amx|Utils.addLogMessage(String)
10:35:33.884 (23884982343)|METHOD_ENTRY|[548]|01pc00000006amx|Utils.addLogMessage(String)
10:35:33.884 (23884991454)|SYSTEM_MODE_ENTER|true
10:35:33.886 (23886260120)|SYSTEM_METHOD_ENTRY|[120]|System.debug(ANY)
10:35:33.886 (23886275500)|USER_DEBUG|[120]|DEBUG|DEBUG: addLogMessage, message = DEBUG, addOrgAgenciesIDsToFileData process agency from the ORG orgAgName = Imagine LA
10:35:33.886 (23886282661)|SYSTEM_METHOD_EXIT|[120]|System.debug(ANY)
10:35:33.886 (23886290056)|SYSTEM_MODE_EXIT|true
10:35:33.886 (23886302532)|METHOD_EXIT|[548]|01pc00000006amx|Utils.addLogMessage(String)
*********** MAXIMUM DEBUG LOG SIZE REACHED ***********
10:37:59.799 (169799071975)|FATAL_ERROR|Internal Salesforce.com Error
Salesforce also seems to be retrying to process Email Service: I am not sending any new emails, but judging by the logs files, Salesforce is trying to finish the process for several times:
USER_DEBUG|[120]|DEBUG|DEBUG
showing up in the log would suggest that the logging filter levels are still set low. Try checking these again to see if you can see what was occurring before the internal server error. If you can get the internal server error Id it would be best to raise a support case with it.