Click to See Complete Forum and Search --> : dalay returning of web service invokation
rgalopo
October 3rd, 2007, 03:16 AM
Hi All!
I’m developing a multithreading C# application in which one I invoke several web service methods in the same machine. Those web services have been developed with java / Apache web server, and I can’t change them.
My problem occurs sometimes in Windows XP, when I invoke a web service method the call needs a lot of time to return. However I have no problems in Windows 2000, it runs perfectly.
Does somebody know why?
I’ll give you a clue, the multithreaded application has a heavy CPU percent usage.
May be this related with the problem?
Advanced thanks!
PeejAvery
October 3rd, 2007, 07:42 AM
I have seen XP have a lot of problems with starting services from time to time. Dependencies on other services can create time lag. Are you able to check for other dependencies to see if that has slowed it down?
Also, does this happen every time, or just part of the time?
rgalopo
October 3rd, 2007, 10:52 AM
At the starting it runs properly (more or less), it appears not to be a problem with the starting services order.
Imagine that 2 of 5 invocations are delayed. In my opinion, If the services had a starting problem, I would have delay problems in 5 of 5 invocations.
In any case I'll research about web service dependences, you never know. But It seems to me that the app CPU comsuption is ****'n the procesing time of the web services.
I've configured better performance to background services in both O.S. but the result is the same.
I’ll give you another clue: when the system has been running several hours, the delay effects are increased although the system has enough memory to be consumed.
In Widows 2000 it runs perfect after several days as good as first hour.
Thanks by your interest.
Craig Gemmill
October 4th, 2007, 12:27 AM
Besides the fact that you're dealing with Java (I had to say that :p), this sounds like either a network connectivity issue or an exception issue.
- Are you getting any exceptions that you’re handling silently which might provide some insight?
- Are you absolutely positive that the 2k and XP machine are using the same network/routes to the web-service? If they are on the same local network, try connecting to the web-service using its IP address.
- Are you sure there is no spyware, firewall, etc running on the XP machine?
rgalopo
October 4th, 2007, 04:14 AM
I agree with you about the java performance… but it’s another question, and I can’t touch this.
I’ve no firewall, nor spyware, ..etc, it’s a clean installation.
You have perfectly described the visual effect, it appears to have problems to find the service, and the time from the app invocation to the invocation returning is very variable. It is very strange because web service invoked and application are running in the same machine (We are in development phase).
Before to read your answer the address I’ve put was “127.0.0.1”. After read your comment, I’ve changed this to “localhost”, and it seems to me it works better.
Now I’ve done writing the machine’s IP address, and the miracle has been done.
Congratulations! It works much better than before, but too far of Windows 2000 performance…
I think that now I only have a CPU usage problem, I don’t know why, but in Windows 2000 all applications and threads have time to feed, and in Windows XP there are rich and poor apps / threads.
Do you know why local IP instead of “localhost” or “127.0.0.1”?
Do you know what it’s different in multithreading management between both O.S.?
Thank you by your attention and your accurate answer.
PeejAvery
October 4th, 2007, 08:00 AM
Do you know why local IP instead of “localhost” or “127.0.0.1”?
I do not know for sure, but these would be my guesses...
127.0.0.1, also known as loopback, invokes remote services. I am not sure if calling the actual NIC IP does that. The set IP is a direct call to the machine. Also, localhost is set by the hosts file (must reboot/login to apply changes) and is not the true call for 127.0.0.1 unless set. So it must check the hosts first.
Do you know what it’s different in multithreading management between both O.S.?
That would be a question you should post in the Multithreading (http://www.codeguru.com/forum/forumdisplay.php?f=63) forum.
rgalopo
October 5th, 2007, 10:30 AM
Thank you!
I will try it in multithreading forum,
Bye
PeejAvery
October 5th, 2007, 10:32 AM
Glad to help! Good luck. :thumb:
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.