概要 この記事はRDS(Mysql)のスケールアップでMaxConnection数がどれくらい上がるかを調査した際の備忘録です。 詳細 mysqlでのmax_connectionsは以下の計算式の結果が反映される
どうも、コンサルティング部の後藤です。 困っていたこと 対象RDSインスタンスタイプの「max_connections」のデフォルト値を知りたい。 max_connectionsを既に任意の値に指定しており、デフォルトの設定に戻す方法を知りたい。 回答 (1). 対象RDSインスタンスタイプの「max_connections」のデフォルト値を知りたい RDSのパラメータグループで設定されている「max_conenctions」のデフォルト値は以下の計算式によって設定されております[1]。 {DBInstanceClassMemory/12582880} DBInstanceClassMemoryはDBインスタンスに割り当てられたメモリ容量になります。 計算式で算出した値と実際の値は異なるため、実値についてはRDSインスタンスに接続した後、以下コマンドでmax_connectionsの値を確
こんにちは。エンジニアの宮本です。 先日アプリ開発をしていると「too many connections」というエラーが発生し、MySQLにアクセスできなくなりました。 「too many connections」、つまり接続数が多いという理由のため、MySQLの設定を変更し接続数(max_connections)を増やす、1回の接続時間(wait_timeout)を短くするなどの対策をとれば解決します。 その方法は、SSHでサーバへログインし「/etc/my.cnf」を編集することによって可能です。 しかし、クランチタイマーではアプリ開発・運用環境としてAWS(Amazon Web Service)を使っており、データベースサーバーはRDSを使用しているため、ターミナルを使用してSSHで直接ログインし、「/etc/my.cnf」を直接編集することができませんでした。 どうすればよいかと調
今北産業 max_connections がおかしい時は、 一旦適当な数字に変えてから 戻してみよう kwsk m1.medium の RDS インスタンスを動かしてるのに、なぜか が 151 という結果を返してきた。RDS での max_connections は、デフォルトでは {DBInstanceClassMemory/12582880} になるはずなんだけど、151 という数字は少なすぎる。 m1.medium のメモリは 3.75 GB だから、値としては 3.75 * 1024 * 1024 * 1024 / 12582880 = 320 になるはず。 とりあえず値を直接 320 と指定してみたところ、先ほどの select 文は 320 を返すようになった。なんだ変わるじゃん。ってことで、再度 {DBInstanceClassMemory/12582880} に戻したら、今
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く