-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Ivan,
On 6/29/17 9:32 PM, Yin, Ivan wrote: > I am using Tomcat7 and have deployed a web server on it. > > Currently the client side is running into the error > “*java.net.SocketTimeoutException: Read timed out*” after running > the web service for one minute. > > I understand that this can be set in the client side but I would > like to change this default value in the server side. Is it > possible? No. > I have found a related page as below: > > https://axis.apache.org/axis2/java/core/docs/http-transport.html > > Two timeout instances exist in the transport level, Socket timeout > and Connection timeout. These can be configured either at > deployment or run time. If configuring at deployment time, the user > has to add the following lines in axis2.xml. > > For Socket timeout: > > <parameter name="SO_TIMEOUT">some_integer_value</parameter> > > According to this , I tried to add this line in the axis2.xml file > and restart tomcat but it didn’t work. Has anyone done this before > or is there anything way to change it in the server side? > > Any comment would be appreciated. You can't change client TCP settings from the server. The two timeouts mentioned there are for two different socket operations: connection and read-after-the-connection-has-been-made. There are two timeouts because sometimes your connection to a server might have to wait in line (called the "backlog") to acquire a connection, but once connected you think that communication should be pretty fast. So you can set a connect-timeout of e.g. 60 seconds but then a socket timeout (read) of maybe 5 seconds. But the server cannot tell the client "your read timeout should be 30s" -- at least, not as a part of TCP. If you want to do that at the application layer, you are free to do so. For example, if you were using HTTP and knew that the response headers would be available to the client very quickly but that the complete response might take a long time to generate and send to the client, you might be able to set a response header like: X-Client-Timeout-Hint: 120000 Since I'm making this up, I chose ms as the unit, so 120000 = 2 minutes. The client would make the connection, read the headers, and then, seeing the X-Client-Timeout-Hint header, would change its own socket timeout setting and then make subsequent reads. There are no clients I know of that implement anything like this automatically, so you'd have to customize all your clients. - -chris -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJZVkVXAAoJEBzwKT+lPKRYWCkQAIlObkgqLUPwDly2+SPu/bMy 4S8YwyeG/rPrwqoYmF9PyI+CjXgQkfzZD1KnvdHWZ9Z2oOK8QqWkCA2dL0vD++5w S9+5ZBwriDsCb7ODVowMUw1NR+tXVr2JBt/m8pytazYsZjlm7EnoM5A5Ox5hAt1z ktAdgDRA1Ys32Ei3IftCSNhm/ejgpT3y3Dr/0x7gLMGkkRofFN9mEbNnxyA6FyRr z4uVXW2IB8WZQ2DRjgVf801vWNmKmUIlrfU9RXjgnZsom+q54tEVmllDDb/UPgql 8+Y1pR9SJlcSaxaRH0VcZ5MmEWdRjslwldrlXOjcXrkZ3akixRlguHhra398lp/4 PQwnEspYoYXMJeRjuPutMfbg94h9t4ePeAO7/LxzQv+UJTIFOCzjHFjXAwYvW4wu cgWDAUuPCOUhrt9exVdhE3QAbNldtA2GwhIUBl6ywDdYVpucMWquipFEdYs9CKDo dOyIAodcslqQX43JfAN7I3HmfIz6MiEHlLLTqEB+EWPBv/Kv6hDf373/WzZu+EKI mWCS5ta+ZaxXy8g9q/CVsk0jspbTCgVNkJrEfa8pGhYvn2ARWG4WCPWdMq2vgMxV 7LSr1FfzwJoh6N/TnPU16FYPGwDsqpmpw7h6XnOyU4lY+C228q2HbUCuLTnp7zAN dKc82EobVp/6lF0frkuI =HccB -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org