Author Message
GeorgeGao
Joined: Nov 26, 2013
Messages: 38
Offline
Hi, while I am testing with the sample application, I encounter the following:


---> SOAP message: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header/><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Connection Failed: All available connections are in use. Try again later.
</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
A SOAP fault was raised: javax.xml.ws.WebServiceException: java.lang.RuntimeException: [SOAP-ENV:Fault: null]
---> FAULT: Connection Failed: All available connections are in use. Try again later.



I suspect because i continuously ran this within very short period.


I notice some comments in the sample code "//Repeated invocation of SMS requests
// without propagating the sessionID information correctly could result in (temporarily)
// exhausting all available SMS connections."

It seems it is the root cause, but what is the proper way to propagate the sessionID information, is there any sample we can refer to?



Thank you.
JohnBiggs
Joined: Jun 20, 2005
Messages: 1139
Location: Rural, Virginia
Offline
Each of your requests is creating a new session, and until they timeout due to inactivity they tie up resources on AES.

I am pretty sure that the sample app contained in the SDK propagates the Session ID (but I didnt go re-verify that). Additionally, there is a description of the actions needed to propagate the Session ID in the user guide document contained in the SDK.
GeorgeGao
Joined: Nov 26, 2013
Messages: 38
Offline
Thanks, John.

I am using the sample client. It does have the release method.

For my case, i want to continuously call two the methods.

I notice if the first release the Session ID slow, when i start calling the method, then it has problem.


My current way is:

1. Setup SEssion 1
2. Call Request 1
3. Manage Session 1 Request
4. Release Session 1
5. Setup Session 2
6. Send Request 2
7. Manage Session 2
8 Release Session 2.


With this way, the error intermittently comes at step 5. Shall I add some delay between Step 4 and 5?



Thank you.
GeorgeGao
Joined: Nov 26, 2013
Messages: 38
Offline
Could anyone help to reply? Why the session is released and there is still the exception, and what might be the proper way to send multiple requests?

So is it better to use multiple threads to send the requests to avoid such connection failed error?


Thank you very much.
JohnBiggs
Joined: Jun 20, 2005
Messages: 1139
Location: Rural, Virginia
Offline
Each session you create ties up one SAT session, and there are a limited number of those depending on the Communication Manager system size (I think 5 for small and 16 for large - the capacities table has this information. It may vary by release). It would be far better to have one SES session.

What do you mean by continuously? As soon as one response is received, send the next request? That is just reducing Communication Manager 's ability to do call processing and other types of work. Is back to back requests truly necessary? Can you send a pair of requests roughly each 3 or 5 seconds and be nice to other users on Communication Manager ?

Why isn't your approach
1. Setup Session 1
2. Send Request 1
3. receive Request 1 response
4. copy session ID into Request 2 , send request 2
5. receive Request 2 response
6, delay
7 if not exiting then
7a. copy session ID into Request 1
7b. go to step 2
8 Release Session 1.
Go to:   
Mobile view