Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TeamPass 2.1.27.36 - Login and loading of folder Trees very slowly #2637

Open
TreAHug opened this issue Jun 25, 2019 · 19 comments
Open

TeamPass 2.1.27.36 - Login and loading of folder Trees very slowly #2637

TreAHug opened this issue Jun 25, 2019 · 19 comments

Comments

@TreAHug
Copy link

TreAHug commented Jun 25, 2019

Hello,

we're preparing our transition from our old password safe to Teampass. For this we've exported our password Database to Teampass (around 400 Entries and some subfolders). But since we imported those passwords, Teampass experienced a massive drop in Performance.

I.e. the Login to Teampass for Users, which are allowed to access to the imported entries, takes about 15s. After this period it takes an additional 25 - 30s until the folder tree is completely loaded and all Items are accessible.

We already run an update to the latest version.

We are running Teampass on a virtual appliance (4GB, 4 Cores, Debian). The monitoring of the system resources aren't showing any bottlenecks,

@juliocbc
Copy link

Same problem here, after updating from 2.1.27. Working fine only on Firefox.

@TreAHug
Copy link
Author

TreAHug commented Jun 28, 2019

@juliocbc interesting! For us it's the same with Chrome, Firefox, Internet Explorer and Edge. So no difference between browsers at all.

@juliocbc
Copy link

The version that I'm using:

Screen Shot 2019-06-28 at 12 58 49

@TreAHug
Copy link
Author

TreAHug commented Jul 2, 2019

We are using the following versions.

image

image

@bramyuh
Copy link

bramyuh commented Jul 12, 2019

For us, it's the same problem; but not browser-dependent.
When we copy an item, create an item, it takes a few minutes sometimes....

So far, what I've have been seeing, is that when we do such actions, the cache table gets truncated (?) and then every item is inserted again. I've commented out the updateCacheTable function in some php files: that seems to solve the problem (at least a bit).... but then de search will slow down.

@bramyuh
Copy link

bramyuh commented Jul 15, 2019

Ok. I've configured/optimized some settings in mariadb; instead of 30 inserts per second we now get some 300 inserts per second [edit: now a lot more, like 100000+].
This means it still needs some 4 or 5 seconds to complete while copying only one item to another folder.
I think the slowness while logging into teampass and loading of the tree is somehow related; that is you should research about optimizing your database.

@TreAHug
Copy link
Author

TreAHug commented Jul 23, 2019

@bramyuh what changes did you do? How big was the effect on the search engine of Teampass?

Thank you very much, for your answer.

@bramyuh
Copy link

bramyuh commented Jul 29, 2019

Hello @TreAHug,
Sorry a bit late: in the end I left teampass as it is (updateCacheTable is in place).
The search is... near immediate.
in /etc/mysql/mariadb.conf.d/50-server.cnf:
tmpdir = /run/mysqld
further, I set the following variables. You should calculate your optimal settings for these.
innodb_buffer_pool_size = 4096M # should be around 75% of your RAM
innodb_buffer_pool_instances = 4 # 1 per GB of innodb_buffer_pool_size
innodb_flush_log_at_trx_commit = 0
innodb_flush_log_at_timeout = 10
innodb_log_buffer_size = 8M
innodb_log_file_size = 512M

@TreAHug
Copy link
Author

TreAHug commented Aug 1, 2019

@bramyuh thank you very much. Sadly this didn't help with our issue. We are going to look further into it. If there is no fix, we'll look into another tool.

@nilsteampassnet
Copy link
Owner

nilsteampassnet commented Aug 6, 2019

@TreAHug Can you please indicate me how many folders you have? Can you also share the tp.config.php please (please remove any sensitive data)?
Does this happen for all users?
Do you have LDAP authentication enabled?
Could I access to your instance by Teamviewer to see what configuration of folders vs roles is in place?

@TreAHug
Copy link
Author

TreAHug commented Aug 14, 2019

@nilsteampassnet

I attached the tp.config.php.

We have around 600 Folders (give or take a few)
Yes, LDAP is enabled.
Can you check the config file?

A Teamviewer Session could be possible, but I have to clarify with a colleague the time slots.

tp.config.php.txt

@nilsteampassnet
Copy link
Owner

nilsteampassnet commented Aug 18, 2019

I believe it is the Windows LDAP connection that takes too long to answer.
Would it be possible for you to disable temporary the LDAP auth, then connect with your account to check if still you have this slowness?
Perhaps also try to reduce the number of domain controllers?
Note that all my ldap tests are performed with posix.

@TreAHug
Copy link
Author

TreAHug commented Aug 20, 2019

@nilsteampassnet
Thank you for your suggestions.

We tried the following:

  • Reduced LDAP DC to one. The issue persists. Loading times are still very high
  • Internal LDAP test (test current configuration) have fast responses
  • we deactivated the LDAP connection and tested it with a preexisting user. The loading times still have been abnormally high
  • We added a fresh, local User. The loading time persisted high with no change.

As for a Teamviewer Session: We have the information if it would be possible by Wednesday. Is it possible to have a private conversation for initiating the session?

Again thank you very much for your assistance!

Kind regards

@nilsteampassnet
Copy link
Owner

Than k you for the tests.
So it seems indeed related to LDAP.
As this part is managed by a library, I need to check its configuration.
Perhaps it could be optimized by using special parameters.
I need to check.

@nilsteampassnet
Copy link
Owner

@TreAHug
So I evaluated the changes.
It exists a new version of the library.
Its implementation requires a lot of changes as its usage is not the same.

As branch 3 is on good progress, I will implement this new library on it only. It is too much effort to perform this massive change on both branches.
Can I suggest that until branch3 is deployed (end of November) you change your settings to use an internal ldap server?

@TreAHug
Copy link
Author

TreAHug commented Aug 26, 2019

@nilsteampassnet

Thanks for your suggestion. We are curious as to how the LDAP Connection is the issue? We thought we ruled it out by completely deactivating and using a local User. Since the issues persisted in this scenario, we are not sure how the LDAP Connection is still related.

What do you mean by "internal" LDAP Server? The internal Teampass User Database?

Kind regards
Alexander Trescher

@TreAHug
Copy link
Author

TreAHug commented Sep 19, 2019

@nilsteampassnet
Hello Nils, I wanted to know if you could answer my last question. Thank you very much in advance!

Kind regards
Alexander

Thanks for your suggestion. We are curious as to how the LDAP Connection is the issue? We thought we ruled it out by completely deactivating and using a local User. Since the issues persisted in this scenario, we are not sure how the LDAP Connection is still related.

What do you mean by "internal" LDAP Server? The internal Teampass User Database?

@ortizleo
Copy link

ortizleo commented Apr 6, 2020

Same problem here. Teampass is unusable, so slow.

@mxyzplk
Copy link

mxyzplk commented Aug 5, 2022

I had the same problem here. I don't use LDAP and the teampass here has 240 folders.
Trying a new installation I noticed that with the clean install configuration file the slow behavior was gone. When I imported the one from my backup, the slow behavior resumed. Researching a little on the web it was suggested that maybe one PHP plugin was with a problem too.
So I tried to switch off I few options. While I did not have time to isolate which option is the one causing the slow behavior, those 5 being turned off helped with the slow problem: The registry of user connections to the database and the registry of items visualization and the three notification emails options.
Imo, the registry options and the email notification related to items exhibition are more likely to be the culprit as the are probably a lot triggered during the folders exihibition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants