Could not load items. Server returned status: -1

Issue #781 resolved
koszta5
created an issue

When logged in I can't load the "home page" with all the repos (needless to say there is quite a few of them), I m getting: Could not load items. Server returned status: -1

All of these repos are hg.

When I am logged out and access the home page everything work fine and seems to be faster.

I am assuming that there is a different logic behind loading the page when logged in and when logged out. Which is peculiar and I think that is the root cause???

Comments (17)

  1. Antonin Rozsypal

    Additional information: When a user tries to login, the log is full of entries like the following:

    2015-12-07 14:06:28.206 [http-bio-7778-exec-177431] TRACE sonia.scm.security.AuthorizationCollector - retrieve AuthorizationInfo for user ffzbrv from cache
    

    The client interface (web page) returns the above mentioned error long before all the repositories are scanned for access rights. I suspect the problem is related to the number of repositories. The repository count is currently 3134. The issue also gradually appeared a few weeks ago and now all non-admin users experience this. Admin users don't see this issue.

    SCM Manager version: 1.45

  2. Antonin Rozsypal

    The issue happens specifically for logged users that are not admins. If I am and admin or am not logged in, the loading of all repositories is fairly fast.

    I was able to fix by increasing the timeout for the initial load to 5 minutes. However, the initial load then takes around 2 minutes. I suspect some inefficiency in evaluating user rights to repositories.

  3. Antonin Rozsypal

    This has been almost a year. We can work with the tool with the above mentioned fix (increasing timeout for the initial load) but it is really inconvenient for all users to wait several minutes to log in.

    Can you please look into this? Perhaps some optimization of the user rights evaluation or caching of the user rights would help? We are running version 1.45, would upgrade help (I haven't seen any note about this in the release notes of the newer version, though)?

    Thanks, any help is appreciated.

  4. Antonin Rozsypal

    Sebastian,

    I am attaching a copy of the log when user "fftb3p" tried to log in. I had to change the log level to TRACE and restart the server. It seems to have helped a bit (the restart) and the authentication now takes 40 seconds. However, within a day or two we will back to over 2 minutes. I am also attaching a screenshot from Probe - it shows the memory levels before the restart.

    Thanks, Antoninscm_manager.png

  5. Sebastian Sebastian repo owner

    Indeed most of the time is taken for the collections of the user permissions. A large part of the user permissions is already cached, perhaps the cache is too small for your installation. I will have a look, if we could optimize the caching behaviour. Perhaps we have to check the cache stats for your installation.

  6. Antonin Rozsypal

    I did a test on a sample of the repositories. The old version (1.45) takes 25 seconds to load. The new version (1.52-SNAPSHOT) takes 12 seconds. So far this looks promising. I will do another test on the full set of repositories.

  7. Antonin Rozsypal

    The test on a full set of repositories confirms the results. The old version takes now 40 seconds to load (the performance degrades over time, going from 25 to 40 seconds). The new version is consistent and takes 10-12 seconds.

    This is a great improvement, thanks for implementing it. Is this going to be included in the 1.52 version? When will this version be released? Or, is it ok to use the 1.52-SNAPSHOT version in production?

  8. Log in to comment