Im using vb.net to write a web services. After couple of days the stress test on all the function, my exception catch sometimes is return the error message as a title but sometimes is not, why is this problems? Please advice.
Below is the coding to connect on the crmod server and this sample code is provided from oracle webservices sample code,
Public Sub Establish()
If Not sessionId Is Nothing Then
' create a container for an HTTP request
Dim req As HttpWebRequest
req = WebRequest.Create(GetLogInURL())
'username and password are passed as HTTP headers
'req.Credentials = New NetworkCredential(UserName, Password)
req.UserAgent = "Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0"
req.KeepAlive = False
req.Proxy = Nothing
' cookie container has to be added to request in order to
' retrieve the cookie from the response.
req.CookieContainer = New CookieContainer
' make the HTTP call
Dim resp As HttpWebResponse
resp = req.GetResponse()
If resp.StatusCode = System.Net.HttpStatusCode.OK Then
'store cookie for later...
cookie = resp.Cookies("JSESSIONID")
sessionId = cookie.Value
So you say its working, then after some point in time, you get a 503 from time to time.
Are you running this single threaded? - is there more than one program running the same request?
Do you have logic to re-try the request when you get a 503?
Yes, absolutely. Please see my reply as below,
(1) Are you running this single threaded? - is there more than one program running the same request?
So far, what I did just a single thread. For example, I click on "functionA", after few seconds is display out result, i close the result pages then i submit the "functionA" again.
(2) Do you have logic to re-try the request when you get a 503?
I do, but the logic and retry to get the error message is very inconsistency. For example, I click on "functionA", it can display result and no error message within couple of times clicking. But sometimes even I first click on the same function already display out that error message.
This really confusing where is the error came from, please advice for the possibility.
When you say 'click on' can I assume that you are are issuing the web service request from a GUI app?
Are you using stateful or stateless connections?
If you are using stateful request, are you using the same session id each time? Are you logging in and out each time? If you aren't and you are establishing a new session each time, you could be running out of sessions. A multi-tennant user only has 10 active sessions available.