Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-1970

long running request to a CXF Web Service may lead to high CPU

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: jboss-fuse-6.1
    • Fix Version/s: None
    • Component/s: Camel
    • Labels:
      None
    • Environment:

      JBoss Fuse 6.1.0.redhat-379

    • Steps to Reproduce:
      Hide

      1) Start with a fresh install of JBoss Fuse 6.1
      2) Unzip demo-jetty.zip
      3) Set the JKS path in issue-demo.xml (JKS file provided in zip)
      4) build jetty-issue-demo with the following command:

      mvn clean install

      5) cd $FUSE_HOME
      6) uncomment admin user in etc/user.properties
      7) install feature camel-jackson
      8) install feature camel-mvel
      9) install wrap:mvn:org.jasypt/jasypt-spring31/1.9.0
      10) install jetty-demo
      11) verify the CXF endpoint is deployed by running:

      cxf:list-endpoints

      12) Install Apache HTTPD (tested with version 2.4.10)
      13) Install Apache mod_ssl module
      14) Generate a key using the instructions provided here
      15) Copy the following configuration to a new file in conf.d:

      LoadModule ssl_module modules/mod_ssl.so
      Listen 8443
      AddType application/x-x509-ca-cert .crt
      AddType application/x-pkcs7-crl    .crl
      SSLPassPhraseDialog  builtin
      SSLSessionCache         shmcb:/var/cache/mod_ssl/scache(512000)
      SSLSessionCacheTimeout  300
       
       
      #----------------------------------
      # 443
      #----------------------------------
      NameVirtualHost *:8443
      <VirtualHost *:8443>
              ServerName sslproxy.usersys.redhat.com
              ServerAlias sslproxy.usersys.redhat.com
              SSLEngine on
              SSLCertificateFile      /etc/pki/tls/certs/sslproxy.usersys.redhat.com.crt
              SSLCertificateKeyFile   /etc/pki/tls/private/sslproxy.usersys.redhat.com.key
       
              ErrorLog logs/8443_error_log
              # Host Time "Request String" Bytes Status ServerActioningRequest ThisServerName TimeTakenMicroseconds(/1000000)
              CustomLog logs/8443_balancer_log  "%h %t \"%r\" %b %s %{BALANCER_WORKER_NAME}e %v %D"
              LogLevel warn
              SSLProxyEngine On
       
              # CXF REST endpoint
              <Proxy balancer://cxfrs>
                 BalancerMember https://localhost:9292/demo retry=10
              </Proxy>
              ProxyPass /demo balancer://cxfrs
       
      </VirtualHost>
      

      16) Start Apache HTTPD, and verify you can get high cpu by accessing the application on the following url:

      https://localhost:8443/demo/aaa

      Show
      1) Start with a fresh install of JBoss Fuse 6.1 2) Unzip demo-jetty.zip 3) Set the JKS path in issue-demo.xml (JKS file provided in zip) 4) build jetty-issue-demo with the following command: mvn clean install 5) cd $FUSE_HOME 6) uncomment admin user in etc/user.properties 7) install feature camel-jackson 8) install feature camel-mvel 9) install wrap:mvn:org.jasypt/jasypt-spring31/1.9.0 10) install jetty-demo 11) verify the CXF endpoint is deployed by running: cxf:list-endpoints 12) Install Apache HTTPD (tested with version 2.4.10) 13) Install Apache mod_ssl module 14) Generate a key using the instructions provided here 15) Copy the following configuration to a new file in conf.d: LoadModule ssl_module modules/mod_ssl.so Listen 8443 AddType application/x-x509-ca-cert .crt AddType application/x-pkcs7-crl .crl SSLPassPhraseDialog builtin SSLSessionCache shmcb:/var/cache/mod_ssl/scache(512000) SSLSessionCacheTimeout 300     #---------------------------------- # 443 #---------------------------------- NameVirtualHost *:8443 <VirtualHost *:8443> ServerName sslproxy.usersys.redhat.com ServerAlias sslproxy.usersys.redhat.com SSLEngine on SSLCertificateFile /etc/pki/tls/certs/sslproxy.usersys.redhat.com.crt SSLCertificateKeyFile /etc/pki/tls/private/sslproxy.usersys.redhat.com.key   ErrorLog logs/8443_error_log # Host Time "Request String" Bytes Status ServerActioningRequest ThisServerName TimeTakenMicroseconds(/1000000) CustomLog logs/8443_balancer_log "%h %t \"%r\" %b %s %{BALANCER_WORKER_NAME}e %v %D" LogLevel warn SSLProxyEngine On   # CXF REST endpoint <Proxy balancer://cxfrs> BalancerMember https://localhost:9292/demo retry=10 </Proxy> ProxyPass /demo balancer://cxfrs   </VirtualHost> 16) Start Apache HTTPD, and verify you can get high cpu by accessing the application on the following url: https://localhost:8443/demo/aaa

      Description

      When a long running request to a CXF Web Service running on Fuse takes longer than than default Apache connection timeout of 60 sec and using SSLSessionCache we get high CPU on the Fuse Java process.

      Note that if you remove the SSLCacheTimeout setting from Apache this issue can be avoided.

        Gliffy Diagrams

          Attachments

          1. demo-jetty.zip
            81 kB
          2. httpd-fuse.conf
            1 kB
          3. jboss-as-helloworld.zip
            32 kB

            Issue Links

              Activity

                People

                • Assignee:
                  willem.jiang Willem Jiang
                  Reporter:
                  jshepher Jason Shepherd
                • Votes:
                  1 Vote for this issue
                  Watchers:
                  8 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: