Title: Update Amazon RDS max_connections with Parameter Group · Issue #16 · jollygoodcode/jollygoodcode.github.io · GitHub
Open Graph Title: Update Amazon RDS max_connections with Parameter Group · Issue #16 · jollygoodcode/jollygoodcode.github.io
X Title: Update Amazon RDS max_connections with Parameter Group · Issue #16 · jollygoodcode/jollygoodcode.github.io
Description: Do you use Amazon RDS for PostgreSQL? First, what is max_connections? Determines the maximum number of concurrent connections to the database server. max_connections on PostgreSQL Documentation When running a standby server, you must set...
Open Graph Description: Do you use Amazon RDS for PostgreSQL? First, what is max_connections? Determines the maximum number of concurrent connections to the database server. max_connections on PostgreSQL Documentation Whe...
X Description: Do you use Amazon RDS for PostgreSQL? First, what is max_connections? Determines the maximum number of concurrent connections to the database server. max_connections on PostgreSQL Documentation Whe...
Opengraph URL: https://github.com/jollygoodcode/jollygoodcode.github.io/issues/16
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Update Amazon RDS max_connections with Parameter Group","articleBody":"Do you use [Amazon RDS for PostgreSQL](https://aws.amazon.com/rds/postgresql/)?\n\nFirst, what is max_connections?\n\n\u003e Determines the maximum number of concurrent connections to the database server.\n\u003e [max_connections on PostgreSQL Documentation](http://www.postgresql.org/docs/current/static/runtime-config-connection.html#GUC-MAX-CONNECTIONS)\n\nWhen running a standby server, you must set this parameter to the same or higher value than on the master server. Otherwise, queries will not be allowed in the standby server.\n\nDo you know that, by default, each instance comes with a different number of `max_connections`?\nGrab a PSQL console to your Postgres database and check now with `show max_connections;`.\n\nAccording to this [answer on StackExchange](http://dba.stackexchange.com/questions/25840/when-should-i-think-about-upgrading-our-rds-mysql-instance-based-on-memory-usage/25870#25870) (for MySQL), this is how it scales:\n\n| MODEL | max_connections |\n| --- | --- |\n| t1.micro | 34 |\n| m1-small | 125 |\n| m1-large | 623 |\n| m1-xlarge | 1263 |\n| m2-xlarge | 1441 |\n| m2-2xlarge | 2900 |\n| m2-4xlarge | 5816 |\n\nThe numbers in the `max_connections` column looks slightly awkward because they are actually calculated from a formula `DBInstanceClassMemory/magic_number` where `magic_number` differs according to the class of your instance.\n\nTo know exactly what's the `magic_number` for an instance, head over to \"Parameter Groups\" in your Amazon console:\n\n\n\nClick on the default Parameter Group and search for `max_connections` and you'll see the formula.\nIn my case, it's `{DBInstanceClassMemory/31457280}`.\n\n\n\nFortunately, unlike Heroku Postgres where you can't change any of the Postgres configuration, \nyou actually can modify Amazon RDS's configuration options! \n\nThis means, you can, e.g., increase the `max_connections` for a `t1.micro` instance from 34 to 100!\n\nTo do that, you can create a new Parameter Group:\n\n\n\nAnd update the `max_connections` to 100:\n\n\n\nThen, modify your existing instance's DB Parameter Group to use your new Parameter Group:\n\n\n\nSave and restart your instance, and it should now have 100 connections.\n\nFinally, remember to update your Rails app (database.yml) to make use of these 100 connections.\n\nResources:\n- [\"Tune your Postgres RDS instance via parameter groups\"](http://www.davidmkerr.com/2013/11/tune-your-postgres-rds-instance-via.html)\n- [\"Should I increase max_connections in AWS RDS t1-micro for MySQL?\"](http://dba.stackexchange.com/questions/41829/should-i-increase-max-connections-in-aws-rds-t1-micro-for-mysql)\n## \n\nThanks for reading! \n\n@winston :pencil2: [Jolly Good Code](http://www.jollygoodcode.com)\n### About Jolly Good Code\n\n[](http://www.jollygoodcode.com)\n\nWe specialise in Agile practices and Ruby, and we love contributing to open source. \n[Speak to us](http://www.jollygoodcode.com/#get-in-touch) about your next big idea, or [check out our projects](http://www.jollygoodcode.com/open-source). \n","author":{"url":"https://github.com/winston","@type":"Person","name":"winston"},"datePublished":"2016-01-28T15:45:26.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/16/jollygoodcode.github.io/issues/16"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:8e8d9042-404c-1609-6f76-a8b298d8b813 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C4AC:35E4E2:66135D:8A255B:6A5EDE29 |
| html-safe-nonce | 9aa4c98ed2f2ead006b1674b38712861f7aacf4a0272a644fe9b7fce92941204 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNEFDOjM1RTRFMjo2NjEzNUQ6OEEyNTVCOjZBNUVERTI5IiwidmlzaXRvcl9pZCI6IjY3NTgzNDA4MjExMjgyNDA2ODEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 346244fb4284a65dbb40ef6c6536773280f42ade9f34b56f00c4a8145d98fb88 |
| hovercard-subject-tag | issue:129488154 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/jollygoodcode/jollygoodcode.github.io/16/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7491b784118a8125b6c31416c84f96624bfaf708fae63c01902f28a60abcb685/jollygoodcode/jollygoodcode.github.io/issues/16 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7491b784118a8125b6c31416c84f96624bfaf708fae63c01902f28a60abcb685/jollygoodcode/jollygoodcode.github.io/issues/16 |
| og:image:alt | Do you use Amazon RDS for PostgreSQL? First, what is max_connections? Determines the maximum number of concurrent connections to the database server. max_connections on PostgreSQL Documentation Whe... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | winston |
| hostname | github.com |
| expected-hostname | github.com |
| None | 82d0004a35927bdb00c652a57f456c55aa0eda4ade1bc7956d7510fdea6e454b |
| turbo-cache-control | no-preview |
| go-import | github.com/jollygoodcode/jollygoodcode.github.io git https://github.com/jollygoodcode/jollygoodcode.github.io.git |
| octolytics-dimension-user_id | 5326832 |
| octolytics-dimension-user_login | jollygoodcode |
| octolytics-dimension-repository_id | 39484578 |
| octolytics-dimension-repository_nwo | jollygoodcode/jollygoodcode.github.io |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 39484578 |
| octolytics-dimension-repository_network_root_nwo | jollygoodcode/jollygoodcode.github.io |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d2d913dd727d2d7ac189fb4d05b10bc34ecd03ee |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width