Troubleshooting: Errors logged during page requests
Errors are generated by multiple page requests. These errors can both occur through a shopper double-clicking, or parallel Ajax calls.
Problem
The following errors are logged to SystemOut.log:Error | Reason for error |
---|---|
CMN0425E: Error while executing request ... Please verify if this request was executed concurrently with other requests that might generate a new guest user. |
When a shopper with generic cookies invokes an action that requires data to be
persisted, a guest shopping user is created within WebSphere Commerce. The user is then sent new
guest user cookies. If a second request is sent before the guest user cookies are received, it is
also sent with the same generic cookie used in the first. Thus, the same primary key from the
generic user cookie is used to attempt to persist the activity two times and a duplicate key
exception is returned. For example, a shopper with generic user cookies attempts to add an item to their cart twice in quick succession, without allowing for the page to load. |
CWXBR0204I: There are multiple user activity cookies while executing request ... only one is used. |
A shopper's browser does not contain generic cookies, and the shopper is
viewing a page that is loaded with multiple parallel requests. These requests require the shopper to
be persisted within WebSphere Commerce. Since there is no generic cookie to persist, a guest
shopper is generated for each request. The shopper is then served a different user cookie for each
guest shopper created. Only one cookie is used to run subsequent requests. For example, a user with no cookies loads a page with multiple Ajax calls running in parallel. These Ajax calls require the shopper to be persisted within WebSphere Commerce. |
Solution
Both problems can be mitigated by ensuring:
- Requests that do not require a guest shopping user to be persisted within WebSphere Commerce are identified and changed to be run as generic instead.
- Multiple Ajax requests on a page are serialized.
- Double-clicking is handled.