Monday, May 6, 2019

Getting concurrency error "Only one request may be made against a session at a time" with SuiteCloud Plus

Accounts with SuiteCloud Plus License can have a user create up to 10 concurrent Web Services sessions. Use of SuiteCloud Plus does not eliminate the need for session management.

In some cases, users can receive "Only one request may be made against a session at a time" even with SuiteCloud Plus enabled. This is most likely happening either because there are no more sessions available (the license limit was reached) or because the SOAP client application is referring to a session ID which does not exist anymore.

Following are recommendations to avoid these errors:

1) Use request level credentials; Include Passport object in each SOAP request instead of using login and logout operations. When using Request Level Credentials, a new session is generated every time a new request comes to the server.

2) Implement pooling and queuing if there is a chance there will be more than 10 requests per one SuiteCloud Plus license.

3) If the request fails with concurrency error, retry.

4) Avoid using cookies in the SOAP client application if using Request Level Credentials. Session ID is still generated and passed to the client but may be discarded after processing the request. Requests referring to a non-existent Session ID will be rejected with concurrency error.
    For .NET: Do not use CookieContainer
    For Java: use setMaintainSession(false)

No comments:

Post a Comment