O'Reilly logo

OpenShift Cookbook by Shekhar Gulati

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Updating the MySQL max connections setting

The MySQL database will start giving too many connection errors when all the available connections are in use by other clients. In this recipe, you will learn how to update the MySQL cartridge max connections setting.

Getting ready

To complete this recipe, you will need an application with a MySQL cartridge. Please refer to the Adding a MySQL cartridge to your application recipe of this chapter to learn how to install the MySQL cartridge.

How to do it…

Follow these steps to update the MySQL max connection setting:

  1. To set the maximum connections to 200, open a command-line terminal, and run the following command:
    $ rhc env-set OPENSHIFT_MYSQL_MAX_CONNECTIONS=200 --app myapp
    
  2. After setting the environment variable, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required