-
Notifications
You must be signed in to change notification settings - Fork 262
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
Long running Db index creation process constantly pegging CPU, index error in logs #5294
Comments
Hi @mjog! There have been a few reports of issue with the very same index, but I could never wrap my head around why the inserts would conflict as we have application logic that would prevent just that. Ref https://github.com/nextcloud/mail/issues?q=is%3Aissue+is%3Aopen+mail_msg_mb_uid_idx. Thanks a lot for shedding more light onto this mystery. We'll try to have a look soonish. Is there a particular reason why you're still on Mail v1.4? All newer releases will work with Nextcloud 21. We didn't change/drop that index though as far as I know. But still might be worth upgrading. |
Hey @ChristophWurst! Cheers! I must have been working on this too late last night - the instance is indeed running Mail 1.10.0. Apologies for the confusion, I'll update the description in a moment. The instance was also taken from NC 20 to 21, but a couple of days after Mail was upgraded, and while I'm not certain, my impression was that this issue existed with NC 20 as well. |
We just found another instance with the same problem. |
That was fixed in #5440 |
There is also a possibly correlation with the deployment of #5450 |
Explain on the threading query outputs some interesting stuff. It is the only query I could find that would fit the proc stat snippet.
|
\OCA\Mail\Db\MessageMapper::findNewIds |
We did some debugging today. Some ideas how to improve the situation:
|
Took 6 min 8.470 seconds with 1681690 rows in oc_mail_messages. |
Creating an index manually the database fixed the cpu load on the server. But still a bit of an issue. |
Closed with #6234 |
Since upgrading to 1.10, my host's CPU has been pegged by Maria. On running a
mysqladmin proc stat
, I always see something like the following:The id of these queries are incrementing over time, so this index is both expensive to create, and is constantly being re-created.
I'm also seeing #5231, not sure if it's related, and a lot of the following in my logs:
Mail app
Mail app version: 1.10.0
Mailserver or service: Dovecot
Server configuration
Operating system: Debian 10
Web server: Apache
Database: MariaDB
PHP version: 7.x
Nextcloud Version: 21.0.3
Client configuration
Browser: Epiphany 40
Operating system: Ubuntu 21.04
The text was updated successfully, but these errors were encountered: