tst2005googlecode2 / lxmppd

Automatically exported from code.google.com/p/lxmppd
0 stars 0 forks source link

Can't create more than max_prepared_stmt_count statements #391

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

I have a problem with Prosody 0.9.2 with mod_storage_sql and MySQL. I have some 
k users online and i get randomly this error in Prosody: 

http://wklej.org/id/1261314/

What is this? I have never seen this error before. Tell my how i can fix that. 
Increase max_prepared_stmt? default is ~16000 max is 1000000.

Original issue reported on code.google.com by BioShoc...@gmail.com on 3 Feb 2014 at 7:36

GoogleCodeExporter commented 9 years ago
I increase stmt limit in mysql to extremely value - set global 
max_prepared_stmt_count=1000000; and i see strange phenomenon. Mysql increased 
memory usage from 250 mb to 380 mb and suddenly dropped memory to 248 mb. When 
its going on stmt the beign to close - this is output from mysql when memory 
usage is 370 and 248

MariaDB [(none)]> show global status like 'com_stmt%';
+-------------------------+---------+
| Variable_name           | Value   |
+-------------------------+---------+
| Com_stmt_close          | 2025517 |   <---- 370 mb
| Com_stmt_execute        | 2048988 |
| Com_stmt_fetch          | 0       |
| Com_stmt_prepare        | 2047586 |
| Com_stmt_reprepare      | 0       |
| Com_stmt_reset          | 0       |
| Com_stmt_send_long_data | 0       |
+-------------------------+---------+
7 rows in set (0.00 sec)

MariaDB [(none)]> show global status like 'com_stmt%';
+-------------------------+---------+
| Variable_name           | Value   |
+-------------------------+---------+
| Com_stmt_close          | 2040480 | < ---- 240
| Com_stmt_execute        | 2055893 |
| Com_stmt_fetch          | 0       |
| Com_stmt_prepare        | 2054513 |
| Com_stmt_reprepare      | 0       |
| Com_stmt_reset          | 0       |
| Com_stmt_send_long_data | 0       |
+-------------------------+---------+
7 rows in set (0.00 sec)

and it's repeat.

Sorry for my english again :)

Original comment by BioShoc...@gmail.com on 3 Feb 2014 at 8:48

GoogleCodeExporter commented 9 years ago
Apparently we are leaking prepared statements. We will investigate this for 
0.9.3, thanks for reporting this.

Original comment by waqas20 on 3 Feb 2014 at 11:19