[MDEV-15038] Prepared statement needs to be re-prepared Created: 2018-01-23  Updated: 2018-03-26  Resolved: 2018-03-24

Status: Closed
Project: MariaDB Server
Component/s: Server
Affects Version/s: 10.2.12
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Ingo Korndoerfer Assignee: Unassigned
Resolution: Incomplete Votes: 0
Labels: need_feedback
Environment:

Windows Server 2012 R2 Standard



 Description   

We have massive problems with MariaDB freezing with the above error and after hours of googling I could not identify an authoritative answer. This is a production environment that has for the longest time worked just fine, but now that we have set-up some 180 views on the server to relieve computational load from some 50 clients and the corresponding network load we are facing serious performance issues. I would appreciate a lot if there were somebody out there to help me systematically troubleshoot the issue. At this point the only solution I see is to attempt a migration to PostGreSQL or Oracle, but I'd rather avoid that.



 Comments   
Comment by Vladislav Vaintroub [ 2018-01-23 ]

You get an error, but what is freezing? Can you expand a little on your environment? Error text, client driver/language etc

Comment by Ingo Korndoerfer [ 2018-01-23 ]

Freezing. Unprecise. After a certain time, none of my windows clients can connect to the MariaDB backend anymore and get the above error. When this happens I can not connect through Workbench anymore either. The only solution is to restart the Service.
To be honest, I have two copies of my database running on the server: The production db and a development version. Both have several hundreds of tables and views.

Environment: MariaDB latest stable release (10.2.12) on Windows Server 2012 R2 Standard with 64 GB Ram. X5670 2,93 GHz, 64bit.

Error text is:
Errno: 1615
Message: Prepared statement needs to be re-prepared

From many suggestions I attempted to follow one, where they suggest to look at my table_open_cache. This is currently set at 2000.

show global status like 'open_tables' shows some 3700 tables open after, say, 1hour of restarting the server.

Comment by Vladislav Vaintroub [ 2018-01-23 ]

ipkCan you connect with command line client, mysql.exe? if you can not , what does it say then?

Comment by Ingo Korndoerfer [ 2018-01-23 ]

We have today migrated the devel copy of the db to another server, and did fortunately not have another freeze of the production db since then.
Will check when my teams report the next freeze.

Comment by Elena Stepanova [ 2018-01-23 ]

ipk, sorry, but this description gives us nothing to work with. What do your views have to do with the PS re-preparation, what are "serious performance issues", what do have both to do with windows clients connects, how the clients might not be able to connect with the error about prepared statements, the mere existence of which means that the clients are already connected?

Could you please start from the beginning and provide some usable information: process list, stack traces, configuration files, monitoring data from the server, error log, throughput or latency comparison showing performance regressions.

Upd: our messages crossed. Okay, let's wait first to see if you have the problem on the other server. If you do, please provide the above.

Comment by Ingo Korndoerfer [ 2018-01-23 ]

Sorry and thanks for bearing with me. I have managed to set-up the server, and have run a MySQL server successfully for almost 10 years now, but am not a professional. Will attempt to do better.

Comment by Elena Stepanova [ 2018-02-20 ]

ipk, how did it go after the migration?

Comment by Ingo Korndoerfer [ 2018-03-26 ]

The solution was to remove the second copy of the DB from the server. I am now only running one copy of the DB and have not had any further issues. Apparently the server was overloaded in some way. Unfortunately I am not enough of a specialist to be able to give more details.

Generated at Thu Feb 08 08:18:13 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.