You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by "Tim Bartley (JIRA)" <ax...@ws.apache.org> on 2005/03/18 07:20:22 UTC

[jira] Created: (AXISCPP-558) Gracefully handle server side close of persistant connection

Gracefully handle server side close of persistant connection
------------------------------------------------------------

         Key: AXISCPP-558
         URL: http://issues.apache.org/jira/browse/AXISCPP-558
     Project: Axis-C++
        Type: Bug
  Components: Transport (axis3)  
    Reporter: Tim Bartley
 Attachments: http.patch

With persistent connections, the server will typically time out an idle connection and close it from it's end. Currently this results in an exception propagating to the user app when it is safe to transparently close and reopen the connection.

The attached patch adds a new interface that would allow optimized detection of server side closed connections without sending any data. e.g. using recv(MSG_PEEK) - currently the way HTTP transport works there is often some data (trailing white space) left in the connection anyway which stops us seeing the connection as closed so that for now I've just left the channel implementations of reopenConnection as simply "return false;".

The main change is that on receiving a HTTPTransportException in HTTPTransport::flushOutput during the send operations the connection will be reopened (if it hasn't alreayd been reopened before) and the send retried.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (AXISCPP-558) Gracefully handle server side close of persistant connection

Posted by "Fred Preston (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-558?page=history ]

Fred Preston reassigned AXISCPP-558:
------------------------------------

    Assign To: Fred Preston

> Gracefully handle server side close of persistant connection
> ------------------------------------------------------------
>
>          Key: AXISCPP-558
>          URL: http://issues.apache.org/jira/browse/AXISCPP-558
>      Project: Axis-C++
>         Type: Bug
>   Components: Transport (axis3)
>     Reporter: Tim Bartley
>     Assignee: Fred Preston
>  Attachments: http.patch
>
> With persistent connections, the server will typically time out an idle connection and close it from it's end. Currently this results in an exception propagating to the user app when it is safe to transparently close and reopen the connection.
> The attached patch adds a new interface that would allow optimized detection of server side closed connections without sending any data. e.g. using recv(MSG_PEEK) - currently the way HTTP transport works there is often some data (trailing white space) left in the connection anyway which stops us seeing the connection as closed so that for now I've just left the channel implementations of reopenConnection as simply "return false;".
> The main change is that on receiving a HTTPTransportException in HTTPTransport::flushOutput during the send operations the connection will be reopened (if it hasn't alreayd been reopened before) and the send retried.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Updated: (AXISCPP-558) Gracefully handle server side close of persistant connection

Posted by "Tim Bartley (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-558?page=history ]

Tim Bartley updated AXISCPP-558:
--------------------------------

    Attachment: http.patch

> Gracefully handle server side close of persistant connection
> ------------------------------------------------------------
>
>          Key: AXISCPP-558
>          URL: http://issues.apache.org/jira/browse/AXISCPP-558
>      Project: Axis-C++
>         Type: Bug
>   Components: Transport (axis3)
>     Reporter: Tim Bartley
>  Attachments: http.patch
>
> With persistent connections, the server will typically time out an idle connection and close it from it's end. Currently this results in an exception propagating to the user app when it is safe to transparently close and reopen the connection.
> The attached patch adds a new interface that would allow optimized detection of server side closed connections without sending any data. e.g. using recv(MSG_PEEK) - currently the way HTTP transport works there is often some data (trailing white space) left in the connection anyway which stops us seeing the connection as closed so that for now I've just left the channel implementations of reopenConnection as simply "return false;".
> The main change is that on receiving a HTTPTransportException in HTTPTransport::flushOutput during the send operations the connection will be reopened (if it hasn't alreayd been reopened before) and the send retried.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Closed: (AXISCPP-558) Gracefully handle server side close of persistant connection

Posted by "Chinthana Danapala (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-558?page=all ]
     
Chinthana Danapala closed AXISCPP-558:
--------------------------------------


Fixed.

> Gracefully handle server side close of persistant connection
> ------------------------------------------------------------
>
>          Key: AXISCPP-558
>          URL: http://issues.apache.org/jira/browse/AXISCPP-558
>      Project: Axis-C++
>         Type: Wish
>   Components: Transport (axis3)
>     Versions: 1.5 Final
>     Reporter: Tim Bartley
>     Assignee: Chinthana Danapala
>  Attachments: changed_files.zip, http(2).patch, http.patch
>
> With persistent connections, the server will typically time out an idle connection and close it from it's end. Currently this results in an exception propagating to the user app when it is safe to transparently close and reopen the connection.
> The attached patch adds a new interface that would allow optimized detection of server side closed connections without sending any data. e.g. using recv(MSG_PEEK) - currently the way HTTP transport works there is often some data (trailing white space) left in the connection anyway which stops us seeing the connection as closed so that for now I've just left the channel implementations of reopenConnection as simply "return false;".
> The main change is that on receiving a HTTPTransportException in HTTPTransport::flushOutput during the send operations the connection will be reopened (if it hasn't alreayd been reopened before) and the send retried.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (AXISCPP-558) Gracefully handle server side close of persistant connection

Posted by "Chinthana Danapala (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-558?page=all ]

Chinthana Danapala reassigned AXISCPP-558:
------------------------------------------

    Assign To: Chinthana Danapala

> Gracefully handle server side close of persistant connection
> ------------------------------------------------------------
>
>          Key: AXISCPP-558
>          URL: http://issues.apache.org/jira/browse/AXISCPP-558
>      Project: Axis-C++
>         Type: Wish
>   Components: Transport (axis3)
>     Versions: 1.5 Final
>     Reporter: Tim Bartley
>     Assignee: Chinthana Danapala
>  Attachments: changed_files.zip, http(2).patch, http.patch
>
> With persistent connections, the server will typically time out an idle connection and close it from it's end. Currently this results in an exception propagating to the user app when it is safe to transparently close and reopen the connection.
> The attached patch adds a new interface that would allow optimized detection of server side closed connections without sending any data. e.g. using recv(MSG_PEEK) - currently the way HTTP transport works there is often some data (trailing white space) left in the connection anyway which stops us seeing the connection as closed so that for now I've just left the channel implementations of reopenConnection as simply "return false;".
> The main change is that on receiving a HTTPTransportException in HTTPTransport::flushOutput during the send operations the connection will be reopened (if it hasn't alreayd been reopened before) and the send retried.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (AXISCPP-558) Gracefully handle server side close of persistant connection

Posted by "Chinthana Danapala (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-558?page=all ]
     
Chinthana Danapala resolved AXISCPP-558:
----------------------------------------

    Resolution: Fixed

(Visible to axiscpp-developers)


> Gracefully handle server side close of persistant connection
> ------------------------------------------------------------
>
>          Key: AXISCPP-558
>          URL: http://issues.apache.org/jira/browse/AXISCPP-558
>      Project: Axis-C++
>         Type: Wish
>   Components: Transport (axis3)
>     Versions: 1.5 Final
>     Reporter: Tim Bartley
>     Assignee: Chinthana Danapala
>  Attachments: changed_files.zip, http(2).patch, http.patch
>
> With persistent connections, the server will typically time out an idle connection and close it from it's end. Currently this results in an exception propagating to the user app when it is safe to transparently close and reopen the connection.
> The attached patch adds a new interface that would allow optimized detection of server side closed connections without sending any data. e.g. using recv(MSG_PEEK) - currently the way HTTP transport works there is often some data (trailing white space) left in the connection anyway which stops us seeing the connection as closed so that for now I've just left the channel implementations of reopenConnection as simply "return false;".
> The main change is that on receiving a HTTPTransportException in HTTPTransport::flushOutput during the send operations the connection will be reopened (if it hasn't alreayd been reopened before) and the send retried.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXISCPP-558) Gracefully handle server side close of persistant connection

Posted by "Tim Bartley (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-558?page=comments#action_62531 ]
     
Tim Bartley commented on AXISCPP-558:
-------------------------------------

Hi Fred,

I have to disagree strongly.

The application should never need to know about this condition - it is purely an artifact of the HTTP/1.1 protocol. It is always safe to reopen the connection (and propagate any error arising from the re-open) and removes unnecessary exception handling from the client. State management should always be by a service specific mechanism (or cookie's if you really have to) and not rely on connection persistence.

Additionally, Axis's error handling mechanisms provide no way for a client to distinguish between the error propagated in this condition and e.g. a "server down" type error. How does a client app know how to handle this condition and recover appropriately?

Even if, for some reason, an application client application needs to have requests issued over a single persistent connection then this must be a property of the application and the server should therefore be configured not to timeout persistent connections.

If you have a scenario where a client needs to know that behave differently if a persistent connection is used from one request to another over HTTP then I would recommend a transport property (not set by default) be exposed to disable the automatic reopening of connections.

I think without this change, client Axis applications have no choice but to use HTTP/1.0 and non-persistent connections wihch is a major performance issue, particularly when using SSL.

Thanks,

Tim 


> Gracefully handle server side close of persistant connection
> ------------------------------------------------------------
>
>          Key: AXISCPP-558
>          URL: http://issues.apache.org/jira/browse/AXISCPP-558
>      Project: Axis-C++
>         Type: Wish
>   Components: Transport (axis3)
>     Versions: unspecified
>     Reporter: Tim Bartley
>      Fix For: unspecified
>  Attachments: http.patch
>
> With persistent connections, the server will typically time out an idle connection and close it from it's end. Currently this results in an exception propagating to the user app when it is safe to transparently close and reopen the connection.
> The attached patch adds a new interface that would allow optimized detection of server side closed connections without sending any data. e.g. using recv(MSG_PEEK) - currently the way HTTP transport works there is often some data (trailing white space) left in the connection anyway which stops us seeing the connection as closed so that for now I've just left the channel implementations of reopenConnection as simply "return false;".
> The main change is that on receiving a HTTPTransportException in HTTPTransport::flushOutput during the send operations the connection will be reopened (if it hasn't alreayd been reopened before) and the send retried.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Updated: (AXISCPP-558) Gracefully handle server side close of persistant connection

Posted by "Samisa Abeysinghe (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-558?page=all ]

Samisa Abeysinghe updated AXISCPP-558:
--------------------------------------

        Version: 1.5 Final
                     (was: unspecified)
    Fix Version:     (was: unspecified)

> Gracefully handle server side close of persistant connection
> ------------------------------------------------------------
>
>          Key: AXISCPP-558
>          URL: http://issues.apache.org/jira/browse/AXISCPP-558
>      Project: Axis-C++
>         Type: Wish
>   Components: Transport (axis3)
>     Versions: 1.5 Final
>     Reporter: Tim Bartley
>  Attachments: http.patch
>
> With persistent connections, the server will typically time out an idle connection and close it from it's end. Currently this results in an exception propagating to the user app when it is safe to transparently close and reopen the connection.
> The attached patch adds a new interface that would allow optimized detection of server side closed connections without sending any data. e.g. using recv(MSG_PEEK) - currently the way HTTP transport works there is often some data (trailing white space) left in the connection anyway which stops us seeing the connection as closed so that for now I've just left the channel implementations of reopenConnection as simply "return false;".
> The main change is that on receiving a HTTPTransportException in HTTPTransport::flushOutput during the send operations the connection will be reopened (if it hasn't alreayd been reopened before) and the send retried.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (AXISCPP-558) Gracefully handle server side close of persistant connection

Posted by "Fred Preston (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-558?page=history ]

Fred Preston reassigned AXISCPP-558:
------------------------------------

    Assign To:     (was: Fred Preston)

Hi Tim,
I'm not quite sure if this is a good idea or not as I can see valid argument for doing this and not doing this... On balance, I think I would rather the client knew that the server had timed out by catching the thrown exception and then performed its own reconnection.

Regards,
Fred Preston.

> Gracefully handle server side close of persistant connection
> ------------------------------------------------------------
>
>          Key: AXISCPP-558
>          URL: http://issues.apache.org/jira/browse/AXISCPP-558
>      Project: Axis-C++
>         Type: Bug
>   Components: Transport (axis3)
>     Versions: unspecified
>     Reporter: Tim Bartley
>      Fix For: unspecified
>  Attachments: http.patch
>
> With persistent connections, the server will typically time out an idle connection and close it from it's end. Currently this results in an exception propagating to the user app when it is safe to transparently close and reopen the connection.
> The attached patch adds a new interface that would allow optimized detection of server side closed connections without sending any data. e.g. using recv(MSG_PEEK) - currently the way HTTP transport works there is often some data (trailing white space) left in the connection anyway which stops us seeing the connection as closed so that for now I've just left the channel implementations of reopenConnection as simply "return false;".
> The main change is that on receiving a HTTPTransportException in HTTPTransport::flushOutput during the send operations the connection will be reopened (if it hasn't alreayd been reopened before) and the send retried.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Updated: (AXISCPP-558) Gracefully handle server side close of persistant connection

Posted by "Fred Preston (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-558?page=history ]

Fred Preston updated AXISCPP-558:
---------------------------------

     Issue Type: Wish  (was: Bug)
        Version: unspecified
    Fix Version: unspecified

> Gracefully handle server side close of persistant connection
> ------------------------------------------------------------
>
>          Key: AXISCPP-558
>          URL: http://issues.apache.org/jira/browse/AXISCPP-558
>      Project: Axis-C++
>         Type: Wish
>   Components: Transport (axis3)
>     Versions: unspecified
>     Reporter: Tim Bartley
>      Fix For: unspecified
>  Attachments: http.patch
>
> With persistent connections, the server will typically time out an idle connection and close it from it's end. Currently this results in an exception propagating to the user app when it is safe to transparently close and reopen the connection.
> The attached patch adds a new interface that would allow optimized detection of server side closed connections without sending any data. e.g. using recv(MSG_PEEK) - currently the way HTTP transport works there is often some data (trailing white space) left in the connection anyway which stops us seeing the connection as closed so that for now I've just left the channel implementations of reopenConnection as simply "return false;".
> The main change is that on receiving a HTTPTransportException in HTTPTransport::flushOutput during the send operations the connection will be reopened (if it hasn't alreayd been reopened before) and the send retried.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Updated: (AXISCPP-558) Gracefully handle server side close of persistant connection

Posted by "Chinthana Danapala (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-558?page=all ]

Chinthana Danapala updated AXISCPP-558:
---------------------------------------

    Attachment: http(2).patch
                changed_files.zip

I have attached new patch file and the file with changes, so any one can test this. 

> Gracefully handle server side close of persistant connection
> ------------------------------------------------------------
>
>          Key: AXISCPP-558
>          URL: http://issues.apache.org/jira/browse/AXISCPP-558
>      Project: Axis-C++
>         Type: Wish
>   Components: Transport (axis3)
>     Versions: 1.5 Final
>     Reporter: Tim Bartley
>  Attachments: changed_files.zip, http(2).patch, http.patch
>
> With persistent connections, the server will typically time out an idle connection and close it from it's end. Currently this results in an exception propagating to the user app when it is safe to transparently close and reopen the connection.
> The attached patch adds a new interface that would allow optimized detection of server side closed connections without sending any data. e.g. using recv(MSG_PEEK) - currently the way HTTP transport works there is often some data (trailing white space) left in the connection anyway which stops us seeing the connection as closed so that for now I've just left the channel implementations of reopenConnection as simply "return false;".
> The main change is that on receiving a HTTPTransportException in HTTPTransport::flushOutput during the send operations the connection will be reopened (if it hasn't alreayd been reopened before) and the send retried.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira