Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

Am getting a time limit exceeded error when am trying to pull a set of records through database.getquerylocator and binding it to vf page (jqgrid).

I have about 80000 records but am limiting it to 10000 though. Am calling this from a JQGrid. Everytime i click next its just fetching 100 records by passing the pagesize to the standard set controller.

Apart from that am using a count query to display the count on the top of my page.. not sure why its throwing this error..

Can someone help here?

Iam also getting a weird error 'Response size exceeded 30MB organization limit'. Not sure why ? :(

Here is the link to my other post which has the code :-

How to query more than 50000 records in apex and bind it in vf page in jqgrid and paging?

Just now looked through salesforce forums and I got link which shows the same issue as mine.. (except that its showing some salesforce page but am using visualforce page). There is no proper solution give though.

Here is the image

enter image description here

and here is the url :-

http://boards.developerforce.com/t5/Visualforce-Development/What-is-going-on-with-Visualforce-performance/m-p/169466#M21299

and i am embedding only visualforce components inside my page, and not embedding some other visualforce page itself.

*** Description updated on last edit ****

After doing a lot of debugging, i found the problem... This is my situation :- 1. I have to query info from an object called Assets and I have to check if that asset exists in 2 different objects say customerasset and customergroup.

customerasset object holds the information about if the customer has access to that asset &

customergroup object holds information about if the customer has access to a group to which the asset belongs to..

Unfortunately for customerasset we have around 12000+ records for a customer

and there are around 100 groups which the user has access to and each of the group can contain some 100 assets.

So if i try to get the set and set using 2 sepearate queries. and in the third query if i give like this :- select id,name from asset where id in: assetidset or groupid in : groupidset This is taking so much time (10 minutes. screenshot below) as the assetidset has about 12000 assets.

enter image description here

But if i substitue my query directly in place of assetidset its throwing error saying semijoin subselects not allowed.

I tried removing my or condition, its loading quickly. But can someone help me to filter the asset based groupid set as well through an OR condition so that assets are returned if it is present either in assetidset or if the asset's group is present in the groupidset.

I cant create two separate queries because i have to do paging and sorting in my jqgrid using standardsetcontroller of database.getquerylocator.

*** Description updated on last edit ****

share|improve this question
2  
post some code. –  superfell Aug 28 '12 at 4:15
2  
That's probably the view state limit. Try disabling Show View State in Development Mode on your user record. –  Bachovski Aug 28 '12 at 5:07
    
added link to my code @superfell –  Sathya Aug 28 '12 at 8:56
1  
I see you have answered your own q on SF forums, do you mind doing the same here? –  Saariko Sep 24 '12 at 7:59
add comment

1 Answer

Time limit exceeded will come generally if the external API not responding with in the time specified by salesforce ... Here the resolution is replacing the JQgrid is one but its too complicated for your work..... otherwise make use of salesforce components to get that table....

Once again getting the response is also u need to make control...request and response should be concise. or u can make use of JSON apart from sending obect straight away....

share|improve this answer
    
hey kiran thanks for your response, but i have used JQGrid everywhere in my application, so as you say its tough for me to remove that and whenever JQGrid hits the URL, its just returning the json response and not the object itself. FYI I have also edited my post and added the link which has my code –  Sathya Aug 28 '12 at 8:57
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.