David Sanftenberg on Tue, 22 Aug 2017 09:18:09
Running a Standard tier database in preview.
I'm in a situation where we need to increase the 'max_prepared_stmt_count' setting, as it defaults to 16384, which is too low.
Is there a way to set this, or to get this set for me? I cannot do this as my admin user.
mysql> set global max_prepared_stmt_count=1000000; ERROR 1227 (42000): Access denied; you need (at least one of) the SUPER privilege(s) for this operation mysql>
Tao Wu_MSFT on Tue, 22 Aug 2017 15:44:33
Can I know your scenario? and why you need such big count number? For most client, one connection has one prepare statement at most. The default value should be enough.
If the configuration is large, there is a potential risk - if someone does DOS attack to prepare large number of statement, then the service is out of memory, and crash.
David Sanftenberg on Tue, 22 Aug 2017 16:05:42
My application is a large scale Docker orchestration service (Rancher - http://rancher.com/) managing around a thousand containers in my farm. It does seem to require a fairly hefty prepared statement count. Likely not 1,000,000 :D But probably at least double what's on offer right now by default.
Tao Wu_MSFT on Wed, 23 Aug 2017 16:10:01
David, thanks for your reply. We plan to make this parameter configurable, but will not open it because of security concern. Could you send your server information to email@example.com then I can change it for you when it is available?
David Sanftenberg on Thu, 24 Aug 2017 11:41:51
Will do, thanks.