Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-2799

Exclusive locking happens later than should, causes incoming proxy requests to pile up and exhaust the HttpClient connection pool

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.4.0
    • Fix Version/s: 1.4.0
    • Component/s: None
    • Labels:
      None

      Description

      Exclusive locking happens later than should, causes incoming proxy requests to pile up and exhaust the HttpClient connection pool.

      When we changed from "simple" reentrant locks to ReadWriteLocks, we did a mistake in one moment: the read locks are not exclusive locks (multiple threads are able to acquire them). The problem occurs in proxy repositories – where retrieve is sometimes not read but write operation (when the requested artifact has to be fetched). Hence, all the request threads for same file were piling up to request the same file, exhausting the connection pool. The actual write (doCacheItem() call) was protected well, but the pool was already exhausted and Nexus was bleeding...

        Attachments

          Activity

            People

            • Assignee:
              cstamas Tamás Cservenák
              Reporter:
              cstamas Tamás Cservenák
              Last Updated By:
              Rich Seddon
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Date of First Response:

                Time Tracking

                Estimated:
                Original Estimate - 1h Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 6h
                6h