-
Notifications
You must be signed in to change notification settings - Fork 73
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
Enabling polls slows down Nextcloud when using MariaDB/MySQL #3010
Comments
Another useful note: This problem does happen with a fresh install via MariaDB or MySQL. This does NOT happen with SQLite! |
Thanks for your report, but to me it seems to be a performance problem on your side. Enabling an app on nextcloud triggers the repair steps, like it does while updating. So it is not surprising, that the overall performance is affected since this process. The repair steps are necessary to check the db integrity and performs fixes, when possible. If there is a more effective way to check this, I am happy for every proposal or direct PR. |
I don't have a clue, what in polls can affect the instance performance, when installed. I fact, I can't reproduce it. |
Thank you for taking a look into! :) Hm, I understand that there must be a repair step, but that should be called once when enabling, right? So it can't be the reason for this as it doesn't get fixed during the time. Does the repair step get triggered each time when OCC get throw all apps? What is the entry point there? Maybe then I can get a look to. I mean, I found out that even OCC triggers that delay, so I hoped that when OCC goes throw all apps, there might be just a simple and small area we would need to check. What do you think? Hm, strange that you aren't able to reproduce. But it is also strange that this issue hasn't been logged so far. Maybe it is a thing on my side? I have three sompletrly different setups and I am able to reproduce it each single time on all the servers I have, don't matter if snap or manual installation, and don't matter if MySQL or mariadb. Since one of them is a snap installation, you hopefully can reproduce that by quickly installing a snap via |
The repair steps are called only once but every time while updating or enabling the app: See docs. We are using the On all systems I maintain, this just takes maximum 10 seconds. This is rather long compaired to the other apps but IMHO acceptable, since it is a maintaining job. Why |
If you want to find any loaded class you can add a logging of the classname inside the constructor method. i.e. |
And exactly this is the point! Why even occ does have the delay? Yes, it also have a delay when accessing the web page from hour to hour very randomly (any app and only when polls is enabled). The occ command, how does it collect the commands? Maybe this is the point where polls get triggered.
Of course, I also accept that. Thats totaliy fine when ebaling the app. :) |
I could drill down it a little bit. Seems that with calling the occ the commands classes are loaded. The db commands are loading the database schema inside the constructor. This can ex plain, why the issue occurs with a db engine other than sqlite.
The information of the commands is stored inside the ./appinfo/info.xml file. occ parses the commands and loads the corresponding classes to collect detailed information. Doing so the constructors are executed down to the I have to change the strategy of the commands and redesign the database methods. Another affected issue is #2980, which will also be covered with this redesign. |
Aaaah, I understand! Good catch, thanks for that investigation. :) |
I changed the construction and the strategy of using the TableManager and IndexManager. |
BTW: The performance of updates and enabling will not be improved by this fix. |
Thank you a lot! I goive the new beta build a try soon. :)
Sure, that's fine. I just did wonder if that is the same issue as I didn't regioniced the in the past. So, eveything that isn't 100% the default/known behavior is suspicious, you probably know that. :D |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
What went wrong, what did you observe?
occ
command.Video.mp4
What did you expect, how polls should behave instead?
What steps does it need to replay this bug?
occ polls:db:purge
manually.occ
and notice the time it takes until something shows up.occ
and notice the time it takes until something shows up.Installation method
Installed/updated from the appstore (Apps section of your site)
Installation type
First time installation
Affected polls version
5.2.0
Which browser did you use, when experiencing the bug?
Other browser
No response
Add your browser log here
No response
Additional client environment information
No response
NC version
Nextcloud 27 (Nextcloud Hub 5)
Other Nextcloud version
No response
PHP engine version
PHP 8.1
Other PHP version
& PHP 8.2
Database engine
MariaDB
Database Engine version or other Database
& MySQL
Which user-backends are you using?
Add your nextcloud server log here
No response
Additional environment informations
I have three instances with differnt setup and on different servers. I try keeping it clear.
Configuration report
List of activated Apps
Nextcloud Signing status
Additional Information
The text was updated successfully, but these errors were encountered: