http hangs

My http hangs.

Though I set the timeout property to my pub.client:http, it still hangs.
Is there any param that I can set to make the program come out of http if it does not
respond to me in certain amount of time?

Though there are some threads that have this topic, I didn’t get the clear answer.

How to make my program not hang at the call to http and come out after certain defined time?

I have posted the same in “flow and java services section” , but didn’t receive response. So posting here again.

Just to respond you!!

Are you doing http:post or get method??what are you trying to transfer xmlstring or largefile bytes/stream etc…??Are you sure that the target server connection/response working fine??Are you connecting outside dmz or internal to dmz??

Do you see any transient/networks errors in the audit/server logs during this hung??

HTH,
RMG

I am using the http post. I am tranferring the xml string. I know that external system is down. I am connecting to outside the dmz.

I put my http call inside the repeat and mentioned count and repeat interval. I also mentioned “Timeout” property.

But FS hangs at http call and doesn’t return.

If the server you are posting to is not down, but does not respond or acknowledge your post, then pub.client:http will block until the HTTP timeout limit is set (not sure what the watt.server.* property is for this).

One technique for dealing with this is to create a flow that does only the pub.client:http and then invoke that service on its own thread. The parent flow would use pub.sync:wait to retrieve the results returned by the child services pub.sync:notify call. A timeout can be set on pub.sync:wait that will throw an exception after the specified elapsed time has passed. By catching this “wait timed out” exception you can handle it specifically or simply let the parent service throw it if you don’t want to do anything unique with that exception.

Of course, it goes without saying that the root issue here is that the target server is not behaving properly. That error should be addressed with the provider of the web server first before writing code to handle non-compliant behavior.

Mark

One more thing… your original post was made around 2AM Eastern time. Getting upset because no one responded to you immediately is probably not the best way to get help here in the future.

Thank you very much for your help. I am not upset. I was in a hurry to find the solution to this problem.

I looked in Admin doc and found the following regarding “watt.net.timeout”:

watt.net.timeout:
Specifies the number of seconds the server waits for an HTTP request to be fulfilled before
the request times out. The default is 0.

We didn’t change the default behaviour of “watt.net.timeout”. I mentioned the “timeout” property for the http.client:http,

which is of no use. What do you mean by having watt.net.timeout = 0? Will it hang indefinetley?

As per the targer server is concerned, yes, I know that it is down. But I need having the exception handling mechanism to

deal with this scenario.

I am not familiar with the scenario that you mentioned above(1. invoke that service on its own thread 2. The parent flow

would use pub.sync:wait to retrieve the results returned by the child services pub.sync:notify call) . Is there any sample

code to do this or any place in the documentation where it is clear about the above mechanism).

Can you go with TN and use its retry mechanism(if delivery task fails) and to do this you may have to use TN HTTP delivery method instead of builtin client:http service call.But may be its too late for you moving your docs routing via TN… just in case…

HTH,
RMG

Team,

We have set watt.net.timeout=60. But our http call hangs even after 60 sec. It is taking around 3-4 min before we get “connection timed out”.

Is there any one param to set so that http call comes out after that setting without waiting for external system.

Because of this all the documents are getting struck in the queue.

Did you restarted the IS after you set the setting in server.cnf file??

Try to set with higher value like 120 etc…

Also check this link in advantage,same issue as yours.
[URL=“https://advantage.webmethods.com/advantage?targChanId=kb_home&oid=1612979828”]https://advantage.webmethods.com/advantage?targChanId=kb_home&oid=1612979828[/URL]

Search in the advantage keyword “watt.net.timeout”

HTH,
RMG

Here is the information that is posted in advantage for similar problem:

the pub.remote:invoke, uses the java.net.URLConnection class. This class has a known limitation in it, meaning that it does not have a timeout that can be set from code. It appears that this has been changed in JDK 1.5 but for now it looks like you’ll have to use the following properties to be able to use the functionality desired.

sun.net.client.defaultConnectTimeout (default: -1)
sun.net.client.defaultReadTimeout (default: -1)

For more information about these settings please see for example: [url]http://java.sun.com/j2se/1.4.2/docs/guide/net/properties.html[/url]

Also this limitation is only exposed when the the physical machine that is being tried to connect to has no connectivity, i.e. network cable unplugged or machine outage.

But my question here is, I am using “pub.client.http”. Will the above hold for client.http flow service too. My request is waiting around 3min before it comes out. I want it to wait not more than 1 min. Because our partner has a scheduled down time and we don’t want to load up our queues.