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

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

Avatar

Level 4

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.
1 Accepted Solution

Avatar

Correct answer by
Community Advisor
  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.

View solution in original post

3 Replies

Avatar

Employee

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. 

Avatar

Correct answer by
Community Advisor
  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.

Avatar

Level 4

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"