Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-6706

Use MultiThreadedHttpConnectionManager instead of a new HttpClient for every ping

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • High
    • Resolution: Fixed
    • None
    • 2.24.01
    • None
    • None

    Description

      For every user that logs in into the cms, a ping is done whether the sites are live, done at RestProxyServicePlugin. It is better to use a single MultiThreadedHttpConnectionManager instead of creating a new HttpClient over and over.

      protected static HttpClient client = null;
      static

      { MultiThreadedHttpConnectionManager mgr = new MultiThreadedHttpConnectionManager(); mgr.getParams().setDefaultMaxConnectionsPerHost(1000); mgr.getParams().setMaxTotalConnections(1000); mgr.getParams().setConnectionTimeout(1000); client = new HttpClient(mgr); }

      Attachments

        Issue Links

          Activity

            People

              aschrijvers Ard Schrijvers
              aschrijvers Ard Schrijvers
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: