Results 1 to 2 of 2

Thread: Compression issue with PHP client (TcpTransceiver.cpp:158: ConnectionLostException)

  1. #1
    MarcinK is offline Registered User
    Name: Marcin Kobylarz
    Organization: Posterus Sp. z o. o.
    Project: Remote user database
    Join Date
    Aug 2008
    Posts
    5

    Compression issue with PHP client (TcpTransceiver.cpp:158: ConnectionLostException)

    Hello,

    I suppose there is a bug in php client resulting in message:
    Uncaught Ice_UnknownLocalException TcpTransceiver.cpp:158: Ice::ConnectionLostException: connection lost: recv() returned zero
    on php side.

    Investigation reveals that php client sometimes (it is very indeterministic) does not respect compression flag sent by server on validation message. There is a trace from one conversation that shows this:

    PHP side:
    Code:
    [ 08/18/08 08:34:03.518 Protocol: received validate connection
      message type = 3 (validate connection)
      compression status = 0 (not compressed; do not compress response, if any)
      message size = 14 ]
    [ 08/18/08 08:34:03.518 Protocol: sending request
      message type = 0 (request)
      compression status = 2 (compressed; compress response, if any)
      message size = 115
      request id = 1
      identity = SessionFactory/sessionFactory
      facet =
      operation = ice_isA
      mode = 1 (nonmutating)
      context =  ]
    [ 08/18/08 08:34:03.521 Protocol: received validate connection
      message type = 3 (validate connection)
      compression status = 0 (not compressed; do not compress response, if any)
      message size = 14 ]
    [ 08/18/08 08:34:03.522 Protocol: sending request
      message type = 0 (request)
      compression status = 2 (compressed; compress response, if any)
      message size = 115
      request id = 1
      identity = SessionFactory/sessionFactory
      facet =
      operation = ice_isA
      mode = 1 (nonmutating)
      context =  ]
    Server side (Java):
    Code:
    [ 18.08.08 08:31:59:349 Protocol: sending validate connection 
      message type = 3 (validate connection)
      compression status = 0 (not compressed; do not compress response, if any)
      message size = 14 ]
    [ 18.08.08 08:31:59:349 Protocol: sending validate connection 
      message type = 3 (validate connection)
      compression status = 0 (not compressed; do not compress response, if any)
      message size = 14 ]
    In general, I can say that situation when validation message is sent twice is very often, but everything ends fine because php side turns off compression after second 'validation message'. Anyway there are cases when it does not.

    To make situation clear, this happens when server (Java in our case) has no access to the apache bzip classes. By the way, it is very tricky that (for Java) ant.jar must be included in the classpath to make compression work. Couldn't commons-compress be used for example?

    Ice version: 3.3.0
    PHP version 5.2.6
    Last edited by MarcinK; 08-18-2008 at 04:09 AM.

  2. #2
    benoit's Avatar
    benoit is offline ZeroC Staff
    Name: Benoit Foucher
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Rennes, France
    Posts
    2,196
    Hi,

    It's unfortunately a bug in Ice for C++. I've posted a patch here that fixes this issue. Thanks for the bug report.

    Cheers,
    Benoit.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 5
    Last Post: 03-13-2012, 03:58 AM
  2. question about PHP client using IceGrid.
    By silwoods in forum Help Center
    Replies: 3
    Last Post: 10-01-2010, 02:27 PM
  3. Replies: 6
    Last Post: 07-14-2010, 11:26 AM
  4. Replies: 4
    Last Post: 12-09-2005, 04:09 AM
  5. Developing a FileSystem Client in PHP
    By PeteH in forum Comments
    Replies: 6
    Last Post: 10-04-2005, 06:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •