Opush
  1. Opush
  2. OP-105

Render the cassandra client read timeout configurable

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Normal Normal
    • Resolution: Fixed
    • Affects Version/s: 3.0.1
    • Fix Version/s: 3.0.2
    • Labels:
    • Rank:
      6482
    • Sprint:
      Sprint

      Description

      Render the cassandra client read timeout configurable.

      Expected behavior:
      You can define in /etc/opush/cassandra the key "cassandra.read-timeout-ms" with a number >= 0
      It should change the default read timeout of the cassandra client.

        Activity

        Hide
        Thomas HILAIRE added a comment - - edited

        Impacts: none
        QA: it's a hidden configuration so a real QA is not required.
        Just verify the value of "CASSANDRA CLIENT READ TIMEOUT" in log with the CASSANDRA logger enabled with level="DEBUG" at opush's startup.
        A negative number should not allow opush to start.

        Show
        Thomas HILAIRE added a comment - - edited Impacts : none QA : it's a hidden configuration so a real QA is not required. Just verify the value of "CASSANDRA CLIENT READ TIMEOUT" in log with the CASSANDRA logger enabled with level="DEBUG" at opush's startup. A negative number should not allow opush to start.
        Hide
        Stephane COLSON added a comment -

        OPush cannot start when cassandra.read-timeout-ms > 0 (tested with 5)

        09:27:42.484 [WARN ] {n.s.e.config.CacheConfiguration} [t/c/r/] Cache: request has a maxElementsInMemory of 0. This might lead to performance degradation or OutOfMemoryError at Terracotta client.From Ehcache 2.0 onwards this has been changed to mean a store with no capacity limit. Set it to 1 if you want no elements cached in memory
        09:27:43.887 [WARN ] {c.d.driver.core.FrameCompressor} [t/c/r/] Cannot find Snappy class, you should make sure the Snappy library is in the classpath if you intend to use it. Snappy compression will not be available for the protocol.
        09:27:43.887 [WARN ] {c.d.driver.core.FrameCompressor} [t/c/r/] Cannot find LZ4 class, you should make sure the LZ4 library is in the classpath if you intend to use it. LZ4 compression will not be available for the protocol.
        09:27:44.272 [ERROR] {CONFIGURATION} [t/c/r/] Cannot establish Cassandra connection: All host(s) tried for query failed (tried: /10.69.1.24 (com.datastax.driver.core.ConnectionException: [/10.69.1.24] Unexpected error during transport initialization (com.datastax.driver.core.ConnectionException: [/10.69.1.24] Operation Timeouted)))
        09:27:44.275 [ERROR] {CONTAINER} [t/c/r/] All host(s) tried for query failed (tried: /10.69.1.24 (com.datastax.driver.core.ConnectionException: [/10.69.1.24] Unexpected error during transport initialization (com.datastax.driver.core.ConnectionException: [/10.69.1.24] Operation Timeouted))), starting administration services only
        

        With cassandra.read-timeout-ms = 0

        09:26:07.297 [WARN ] {n.s.e.config.CacheConfiguration} [t/c/r/] Cache: request has a maxElementsInMemory of 0. This might lead to performance degradation or OutOfMemoryError at Terracotta client.From Ehcache 2.0
         onwards this has been changed to mean a store with no capacity limit. Set it to 1 if you want no elements cached in memory
        09:26:08.709 [WARN ] {c.d.driver.core.FrameCompressor} [t/c/r/] Cannot find Snappy class, you should make sure the Snappy library is in the classpath if you intend to use it. Snappy compression will not be avail
        able for the protocol.
        09:26:08.709 [WARN ] {c.d.driver.core.FrameCompressor} [t/c/r/] Cannot find LZ4 class, you should make sure the LZ4 library is in the classpath if you intend to use it. LZ4 compression will not be available for 
        the protocol.
        09:26:09.552 [DEBUG] {CASSANDRA} [t/c/r/] perform getCurrentVersion request SELECT version,date FROM schema_version WHERE id=1 ORDER BY version DESC LIMIT 1;
        09:26:09.557 [DEBUG] {CASSANDRA} [t/c/r/] Current version found VersionUpdate{version=Version{version=3}, date=Fri Oct 10 15:20:43 GMT 2014}
        09:26:09.773 [WARN ] {o.e.j.s.handler.ContextHandler} [t/c/r/] o.e.j.s.ServletContextHandler@48da23d0{/,null,null} contextPath ends with /
        09:26:09.868 [WARN ] {n.s.e.config.CacheConfiguration} [t/c/r/] Cache: RequestInfoStore has a maxElementsInMemory of 0. This might lead to performance degradation or OutOfMemoryError at Terracotta client.From Ehcache 2.0 onwards this has been changed to mean a store with no capacity limit. Set it to 1 if you want no elements cached in memory
        

        Tested on CentOS with opush-3.0.2~beta3~git20141009.091827.60ca887-1 and OBM 2.5.9-0.alpha4+git20141010_1919_50b4ea6

        Show
        Stephane COLSON added a comment - OPush cannot start when cassandra.read-timeout-ms > 0 (tested with 5) 09:27:42.484 [WARN ] {n.s.e.config.CacheConfiguration} [t/c/r/] Cache: request has a maxElementsInMemory of 0. This might lead to performance degradation or OutOfMemoryError at Terracotta client.From Ehcache 2.0 onwards this has been changed to mean a store with no capacity limit. Set it to 1 if you want no elements cached in memory 09:27:43.887 [WARN ] {c.d.driver.core.FrameCompressor} [t/c/r/] Cannot find Snappy class, you should make sure the Snappy library is in the classpath if you intend to use it. Snappy compression will not be available for the protocol. 09:27:43.887 [WARN ] {c.d.driver.core.FrameCompressor} [t/c/r/] Cannot find LZ4 class, you should make sure the LZ4 library is in the classpath if you intend to use it. LZ4 compression will not be available for the protocol. 09:27:44.272 [ERROR] {CONFIGURATION} [t/c/r/] Cannot establish Cassandra connection: All host(s) tried for query failed (tried: /10.69.1.24 (com.datastax.driver.core.ConnectionException: [/10.69.1.24] Unexpected error during transport initialization (com.datastax.driver.core.ConnectionException: [/10.69.1.24] Operation Timeouted))) 09:27:44.275 [ERROR] {CONTAINER} [t/c/r/] All host(s) tried for query failed (tried: /10.69.1.24 (com.datastax.driver.core.ConnectionException: [/10.69.1.24] Unexpected error during transport initialization (com.datastax.driver.core.ConnectionException: [/10.69.1.24] Operation Timeouted))), starting administration services only With cassandra.read-timeout-ms = 0 09:26:07.297 [WARN ] {n.s.e.config.CacheConfiguration} [t/c/r/] Cache: request has a maxElementsInMemory of 0. This might lead to performance degradation or OutOfMemoryError at Terracotta client.From Ehcache 2.0 onwards this has been changed to mean a store with no capacity limit. Set it to 1 if you want no elements cached in memory 09:26:08.709 [WARN ] {c.d.driver.core.FrameCompressor} [t/c/r/] Cannot find Snappy class, you should make sure the Snappy library is in the classpath if you intend to use it. Snappy compression will not be avail able for the protocol. 09:26:08.709 [WARN ] {c.d.driver.core.FrameCompressor} [t/c/r/] Cannot find LZ4 class, you should make sure the LZ4 library is in the classpath if you intend to use it. LZ4 compression will not be available for the protocol. 09:26:09.552 [DEBUG] {CASSANDRA} [t/c/r/] perform getCurrentVersion request SELECT version,date FROM schema_version WHERE id=1 ORDER BY version DESC LIMIT 1; 09:26:09.557 [DEBUG] {CASSANDRA} [t/c/r/] Current version found VersionUpdate{version=Version{version=3}, date=Fri Oct 10 15:20:43 GMT 2014} 09:26:09.773 [WARN ] {o.e.j.s.handler.ContextHandler} [t/c/r/] o.e.j.s.ServletContextHandler@48da23d0{/, null , null } contextPath ends with / 09:26:09.868 [WARN ] {n.s.e.config.CacheConfiguration} [t/c/r/] Cache: RequestInfoStore has a maxElementsInMemory of 0. This might lead to performance degradation or OutOfMemoryError at Terracotta client.From Ehcache 2.0 onwards this has been changed to mean a store with no capacity limit. Set it to 1 if you want no elements cached in memory Tested on CentOS with opush-3.0.2~beta3~git20141009.091827.60ca887-1 and OBM 2.5.9-0.alpha4+git20141010_1919_50b4ea6
        Hide
        Stephane COLSON added a comment -

        OK, last test was just legally timeouting.
        With a value of 100 or 500 ms, Opush starts normally.

        Show
        Stephane COLSON added a comment - OK , last test was just legally timeouting. With a value of 100 or 500 ms, Opush starts normally.

          People

          • Assignee:
            Stephane COLSON
            Reporter:
            Thomas HILAIRE
          • Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Agile