[debian-mysql] Bug#1027337: Bug#1027337: mariadb-server-10.5: Huge increase in memory consumption (leak?) since upgrade from 10.5.15 to 10.5.18
Matteo Valsasna
MValsasna at pdxeng.ch
Thu Jan 12 08:55:06 GMT 2023
Thanks a lot Faustin
I found an useful description of MDEV-29988 in a comment to one of its duplicates, and it matches quite well our application scenario for the database connection that cause the memory leak according to information_schema.PROCESSLIST.memory_used
(prepared statements executed maaany times, string comparisons)
we reproduced the issue on a test machine, and we will try to downgrade to 10.5.15
MAtteo
https://jira.mariadb.org/browse/MDEV-30096?focusedCommentId=243814&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-243814
[serg]Sergei Golubchik<https://jira.mariadb.org/secure/ViewProfile.jspa?name=serg> added a comment - 2022-11-28 22:20
Yes, <https://jira.mariadb.org/browse/MDEV-29988> was in 10.6.11 too. But let's first check the preconditions:
* you use prepared statements
* you prepare once and then execute many thousands of times before deallocating the statement
* your statements contains a string comparison with strings in different (but compatible) character sets (e.g. utf8 and latin1).
if all that matches your use case you could be affected by <https://jira.mariadb.org/browse/MDEV-29988> . If you do, then
* every execution of such a prepared statements will allocate more memory
* all memory will be freed when a statements is deallocated (explicitly or when the client disconnects)
* time to deallocate a prepared statement is proportional to the number of times it was executed
and workarounds could be
* deallocate prepared statements more often
* rewrite statements to avoid comparing strings in different character sets
or wait for the next release that will have it fixed
On Tue, 10 Jan 2023 13:36:02 +0100 Faustin Lammler <faustin at fala.red> wrote:
> Hi,
> first of all, thank you all for the excellent (and detailed) report!
>
> I don't see anything that could be related with Debian packaging of
> MariaDB and so I suggest you check directly upstream.
>
> I have searched into https://jira.mariadb.org and the closest report
> that I can come with is https://jira.mariadb.org/browse/MDEV-29988. I do
> not forward this bug report to it because I am not sure that this is the
> same problem.
>
> There is also https://jira.mariadb.org/browse/MDEV-29097 that may give
> some ideas on how to find a workaround until the next release happen.
>
> Cheers!
>
> --
> Faustin
> GPG: F652 BCD1 1AA8 8975 F010 48A5 390A 2F27 832A 5C79
If you received this email in error, please notify the sender and read our confidentiality and data protection disclaimer: https://www.pdxeng.ch/our-company/e-mail-disclaimer/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-mysql-maint/attachments/20230112/e76b0e94/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 174 bytes
Desc: image001.png
URL: <http://alioth-lists.debian.net/pipermail/pkg-mysql-maint/attachments/20230112/e76b0e94/attachment-0001.png>
More information about the pkg-mysql-maint
mailing list