Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPSP setting - npsp:Too many query rows: 50001 #7181

Open
KaTzi-42 opened this issue Jun 23, 2023 · 4 comments
Open

NPSP setting - npsp:Too many query rows: 50001 #7181

KaTzi-42 opened this issue Jun 23, 2023 · 4 comments

Comments

@KaTzi-42
Copy link

When I click on the "NPSP Setting" tab, I receive the following error:

npsp:Too many query rows: 50001
Error is in expression '{!onNpspSettingsLoad}' in component [apex:page](javascript:void(0)) in page npsp:stg_settingsmanager: (System Code)

An unexpected error has occurred. Your solution provider has been notified. (Database)

In the logs, it is evident that the page is hitting a limit while loading.

17:08:41.416 (928882000)|SOQL_EXECUTE_BEGIN|[157]|Aggregations:0|SELECT Id, CronExpression, CronJobDetail.Name, CreatedBy.Name, CreatedBy.IsActive FROM CronTrigger WHERE CronJobDetail.JobType = '7'
17:08:41.416 (1339652764)|SOQL_EXECUTE_END|[157]|Rows:49869

Why is NPSP executing such a strange SOQL query without a filter?
SELECT Id, CronExpression, CronJobDetail.Name, CreatedBy.Name, CreatedBy.IsActive FROM CronTrigger WHERE CronJobDetail.JobType = '7'
image

@rodolforicojr
Copy link

We also encountered the same issues.

19:27:21.791 (792245605)|VARIABLE_SCOPE_BEGIN|[30]|this|npsp.TDTM_Allocation|true|false
19:27:21.791 (792317588)|VARIABLE_ASSIGNMENT|[30]|this|{}|0x20fcfb1b
19:27:21.791 (819341451)|SOQL_EXECUTE_BEGIN|[50]|Aggregations:0|SELECT Id FROM Trigger_Handler__c LIMIT 1
19:27:21.791 (830309613)|SOQL_EXECUTE_END|[50]|Rows:1
19:27:21.791 (845906920)|SOQL_EXECUTE_BEGIN|[98]|Aggregations:0|SELECT Asynchronous__c, Class__c, Load_Order__c, Object__c, Active__c, Usernames_to_Exclude__c, Trigger_Action__c, User_Managed__c FROM Trigger_Handler__c ORDER BY Load_Order__c ASC NULLS FIRST
19:27:21.791 (864690602)|SOQL_EXECUTE_END|[98]|Rows:70
19:27:21.791 (891304524)|SOQL_EXECUTE_BEGIN|[1016]|Aggregations:0|SELECT Id, npsp__Payment__c, Payment__r.npe01__Payment_Amount__c, Payment__r.npe01__Paid__c, Payment__r.npe01__Written_Off__c, npsp__Opportunity__c, Opportunity__r.Amount, Amount__c, Percent__c, General_Accounting_Unit__c, Recurring_Donation__c, Campaign__c FROM Allocation__c WHERE ((Payment__c = :tmpVar1 OR Opportunity__c = :tmpVar2 OR Recurring_Donation__c = :tmpVar3 OR Campaign__c = :tmpVar4) AND Id != :tmpVar5)
19:27:22.981 (1981964897)|SOQL_EXECUTE_END|[1016]|Rows:49930

We are only updating one GAU Allocation record.

I suspect this is from

for (Allocation__c allo : [SELECT Id, Payment__c, Payment__r.npe01__Payment_Amount__c, Payment__r.npe01__Paid__c, Payment__r.npe01__Written_Off__c, Opportunity__c, Opportunity__r.Amount, Amount__c, Percent__c, General_Accounting_Unit__c, Recurring_Donation__c, Campaign__c FROM Allocation__c

NPSP Version: 3.226

@judisohn
Copy link
Contributor

Nope. Same limit, but completely unrelated context and use case.

The original poster is talking about an issue when an org that has custom scheduled jobs that are still considered actively queued and they're trying to load the NPSP Settings page and it fails because NPSP is trying to look at all the users Scheduled Jobs.

That has nothing to do with a query for Allocations.

@rodolforicojr
Copy link

Thanks @judisohn, I will post separate issue then.

@judisohn
Copy link
Contributor

You can, sure, but no one who works for Salesforce is likely to respond. This is not where they track issues in the project. The only way to get Salesforce to look at the issue you're facing is to open a support case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants