Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.
SOLVED

Dispatcher Settings - Are we having default configuration which limits selectors length

Avatar

Level 3

Hi ,

We are having AEM page which creates all the filters options onto the page into encoded format and pass it as selector to AEM servlet. 

If user chooses multiple filter options which exceeds 224 characters it is failing.

Same request works in both author and publisher.

Couldn't find out what is the configuration which is preventing this in dispatcher.

 

Any Suggestions ?

 

Thanks,

Poovitha S

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @PoovithaSelvaraj 

If the request works in both the author and publisher environments but fails in the dispatcher, it is likely that the dispatcher configuration is causing the issue. Here are a few things you can check:

  1. Request Size Limit: The dispatcher may have a configuration that limits the maximum size of a request it can handle. By default, the Apache web server has a limit of 8KB for the request line and headers. If the request exceeds this limit, it can result in a failure. You can check the LimitRequestLine and LimitRequestFieldSize directives in the Apache configuration file (httpd.conf) to see if they are set to a value that is causing the issue. You may need to increase these limits if necessary.

  2. URL Encoding: If the filter options are being passed as part of the URL, ensure that the URL encoding is correctly applied. If the filter options contain special characters or reserved characters, they should be properly encoded using percent-encoding. This ensures that the URL is valid and can be handled correctly by the dispatcher.

  3. Dispatcher Caching: The dispatcher may have caching rules in place that could affect the request. If the request is being cached by the dispatcher, it may not reach the AEM servlet and therefore not encounter the issue. Check the caching rules in the dispatcher configuration to see if the request is being cached and if the cache expiration time is causing the issue. You may need to adjust the caching rules or disable caching for the specific request if necessary.

  4. Dispatcher Logs: Check the dispatcher logs for any error messages or warnings related to the failed request. The logs may provide more information about the specific issue and help identify the configuration that is causing the problem.

    https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/cache-servlet-response/m-p... 
    https://blog.developer.adobe.com/writing-better-aem-dispatcher-filters-f23b391624a9 



View solution in original post

4 Replies

Avatar

Correct answer by
Community Advisor

Hi @PoovithaSelvaraj 

If the request works in both the author and publisher environments but fails in the dispatcher, it is likely that the dispatcher configuration is causing the issue. Here are a few things you can check:

  1. Request Size Limit: The dispatcher may have a configuration that limits the maximum size of a request it can handle. By default, the Apache web server has a limit of 8KB for the request line and headers. If the request exceeds this limit, it can result in a failure. You can check the LimitRequestLine and LimitRequestFieldSize directives in the Apache configuration file (httpd.conf) to see if they are set to a value that is causing the issue. You may need to increase these limits if necessary.

  2. URL Encoding: If the filter options are being passed as part of the URL, ensure that the URL encoding is correctly applied. If the filter options contain special characters or reserved characters, they should be properly encoded using percent-encoding. This ensures that the URL is valid and can be handled correctly by the dispatcher.

  3. Dispatcher Caching: The dispatcher may have caching rules in place that could affect the request. If the request is being cached by the dispatcher, it may not reach the AEM servlet and therefore not encounter the issue. Check the caching rules in the dispatcher configuration to see if the request is being cached and if the cache expiration time is causing the issue. You may need to adjust the caching rules or disable caching for the specific request if necessary.

  4. Dispatcher Logs: Check the dispatcher logs for any error messages or warnings related to the failed request. The logs may provide more information about the specific issue and help identify the configuration that is causing the problem.

    https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/cache-servlet-response/m-p... 
    https://blog.developer.adobe.com/writing-better-aem-dispatcher-filters-f23b391624a9 



Avatar

Community Advisor

@PoovithaSelvaraj 

AEM doesn't have a default configuration that explicitly limits the length of selectors. 

Some older web browsers have limitations on the maximum length of URLs they can handle. While modern browsers have significantly increased this limit, it's still possible to encounter issues with very long URLs, especially in complex applications like AEM.

If your AEM instance is behind a proxy server, the proxy server may have its own limitations on URL length. This can affect the maximum length of URLs that can be forwarded to AEM.

 

But I suggest you to avoid using big selectors which could lead to a performance issue

 

@Jagadeesh_Prakash  , If browser setting is the reason , author request is getting passed , only issue is coming in dispatcher.

Even in Publisher request is getting passed.

That's why wanted to know about the settings in dispatcher since i couldn't find.

 

Thanks & Regards,

Poovitha S

Avatar

Administrator

@PoovithaSelvaraj Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.



Kautuk Sahni