Expand my Community achievements bar.

Please provide the information on how to fix it

Avatar

Level 1

 

Currently, for asset searches, we are utilizing the GET method (via acs-assets-sharecommons). When selecting all images and documents in bulk, the URL is generated  too large:

Due to the extensive length of this GET method, we are encountering a "URI TOO LONG" response, resulting in an "unable to submit the form" error in the UI. It's worth noting that this issue is observed in cloud environments but not in my local setup.

adilakshmi_0-1700213113289.png

Please provide the information on how to fix it

 

1 Reply

Avatar

Level 2

Hey @adilakshmi,

The issue you're encountering with Adobe Experience Manager (AEM) when performing bulk asset searches using the GET method is due to the inherent limitation in the length of URLs in HTTP GET requests. When you select a large number of images and documents, the query string appended to the URL becomes excessively long, leading to a "URI TOO LONG" error. This problem is more apparent in cloud environments due to stricter limitations set by cloud service providers or load balancers.

Possible Solutions:

  1. Switch to POST Method:

    • Consider using the POST method for sending search queries instead of GET. POST requests do not append data to the URL and can handle larger payloads, thus avoiding the URL length limitation.
  2. Refine Search Queries:

    • Optimize and refine search queries to reduce the amount of data being passed. This could involve more specific search criteria or paginating results.
  3. Server Configuration:

    • If feasible, review and adjust server configurations related to the maximum URL length allowed. This is typically done in the server's configuration files (like httpd.conf for Apache HTTP Server) or in the cloud service's settings.
  4. Frontend Handling:

    • Modify the UI logic to handle bulk selections more efficiently, possibly by batching the requests or by changing how the selection data is transmitted.
  5. Backend Optimization:

    • On the AEM server side, ensure that the handling of search queries is optimized for large requests. This might involve adjusting server settings or optimizing the AEM queries.
  6. Load Balancer / Proxy Settings:

    • In a cloud environment, check the settings of any load balancers or proxies that might be imposing lower limits on URL length.

Additional Considerations:

  • Compatibility: Ensure that changes made to accommodate larger request payloads are compatible with all environments where the AEM application is deployed.
  • Testing: Thoroughly test the changes in both local and cloud environments to ensure they effectively resolve the issue without introducing new ones.
  • Security: Be mindful of security implications when changing request methods or configurations, especially in cloud environments.

In summary, this issue requires a careful balance between frontend optimizations, server configurations, and possibly changes in the method of data transmission from GET to POST to effectively handle large asset search queries in AEM.

 

Regards,

Eugene