Multiple AEM requests are being sent to the server at the same time, and responses are being swapped or overridden | Community
Skip to main content
Level 4
July 14, 2022
Solved

Multiple AEM requests are being sent to the server at the same time, and responses are being swapped or overridden

  • July 14, 2022
  • 3 replies
  • 1588 views

Hi,

 
We are facing some intermittent issues with one of our AEM applications that we have recently launched. We used AEM to build the frontend that has Components rendering the API data through AEM servlets, and we do have multiple users that are being managed through Cookies and third party user authentication.
 
Couple of critical issues that we currently see are as follows:
  1. When a user tries to login to the system, they see a different user account information (servlet is responsible to invoke an API with a user unique ID). Though the ID matches with the user ID, we see the information is being set with other user details
  2. We frequently see 'Size of a request header field exceeds server limit.' though we have increase the size for apache variables (LimitRequestFieldSize, LimitRequestLine) via dispatcher vhost files
We presume the issue is due to AEM servlets as they are singleton. Has anyone run into similar issues before? Could you please suggest how to handle these issues?
 
Any assistance is greatly appreciated.
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by arunpatidar
  1. When a user tries to login to the system, they see a different user account information (servlet is responsible to invoke an API with a user unique ID). Though the ID matches with the user ID, we see the information is being set with other user details - check global variable, static variable and methods, where values are getting set.
  2. We frequently see 'Size of a request header field exceeds server limit.' though we have increase the size for apache variables (LimitRequestFieldSize, LimitRequestLine) via dispatcher vhost files - check the cookie, basically cookie might have some unnecessary long values which can be looked upon and improved.

3 replies

Mohit_KBansal
Adobe Employee
Adobe Employee
July 15, 2022

For the #1 issue, a potential problem could be global variables used. Please check your servlet code and make sure that variables are declared correctly with correct visibility. 

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
July 15, 2022
  1. When a user tries to login to the system, they see a different user account information (servlet is responsible to invoke an API with a user unique ID). Though the ID matches with the user ID, we see the information is being set with other user details - check global variable, static variable and methods, where values are getting set.
  2. We frequently see 'Size of a request header field exceeds server limit.' though we have increase the size for apache variables (LimitRequestFieldSize, LimitRequestLine) via dispatcher vhost files - check the cookie, basically cookie might have some unnecessary long values which can be looked upon and improved.
Arun Patidar
HeenaMadan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
July 17, 2022

For issue #1: Check global variables and debug what values you are getting on different user ids in your servlet code.

Issue #2:default Apache header size is 8 KB. You can increase limit to 16 or 32 KB. In httpd.conf file
LimitRequestFieldSize 16000

Restart apache server. "service httpd restart"