Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Too many request calls

anshumank367659
Level 2
Level 2

hi All,
There are many pages created under a cq:page node on sites. When i try to open that particular hierarchy containing all the pages, i get too many calls exception. On investigation it is found that there are some js calls, which is required by the project.

So request calls(High)=number of pages*js calls per page

Increasing the number of calls per request from the Apache Sling Main Servlet Configuration solves the issue, but there is a threshold to it, it cannot be made too high.

Any suggestions on how to combat this situation, i thought of a design where we can restrict the threshold(number) of the number of pages created under a page node. But is there any property or an efficient way to handle this. New approaches would be appreciated.

Many Thanks!!!

1 Accepted Solution
abhishekagg19
Correct answer by
Employee
Employee

Instead of making individual call per child page, create a custom servlet which will deliver the data (json format -cacheable) for all the child pages with one request.

Then use this json data to populate the table data.

View solution in original post

3 Replies
edubey
Level 10
Level 10

There will be multiple pages under a cq:Page node but when you request a page content only under cq:PageContent (jcr:content) gets rendered for that requested resource.

Once resource is resolved, It won't evaluate all cq:Page node under it.

Three things:

What is current value you have set ?

How many node exists under cq:PageContent (include all hierarchy) for the page you are trying to request ?

What do you mean by there is a threshold to it (except the one there is resource needed to compute it) ?

anshumank367659
Level 2
Level 2

thanks for your response, i have approximately 180 pages under a cq:page node, i understand that the content of a page is loaded only when we request the resource(page). But in this case there are few custom columns (overlayed the /libs/wcm/core/content/common/availablecolumns) added to the sites dashboard, which fetch values from the jcr:content node of the page. There is call to overlayed customcell.html (/libs/cq/gui/components/common/admin/listview/customcell) which calls a customcell.js, this is the js where we have added some logic to compress the content to be shown. So this is the reason why we have too many request calls.

abhishekagg19
Correct answer by
Employee
Employee

Instead of making individual call per child page, create a custom servlet which will deliver the data (json format -cacheable) for all the child pages with one request.

Then use this json data to populate the table data.

View solution in original post