Skip to main content

Disabling Keep-Alive for a Web Client

By default, if you reuse an InterSystems IRIS® data platform web client instance to send multiple request messages, InterSystems IRIS sends all the messages in a single HTTP transmission (using a HTTP 1.1 keep-alive connection). Specifically, InterSystems IRIS keeps the TCP/IP socket open so that InterSystems IRIS does not need to close and reopen it. To disable this keep-alive behavior, do either of the following:

  • Kill the web client instance and create and use a new one.

  • Set the client’s HttpRequest.SocketTimeout property to 0 after you send the first message. For example:

    Set client.HttpRequest.SocketTimeout=0
    
Note:

If you are using WS-ReliableMessaging and you are using SSL/TLS to communicate with the web service, do not disable keep-alive. For information on WS-ReliableMessaging, see Securing Web Services.

FeedbackOpens in a new tab