[ARVADOS] updated: fa615bfa6748a0b552c4e3a33be1921f0760664e

Git user git at public.curoverse.com
Tue Jun 21 10:57:03 EDT 2016


Summary of changes:
 services/api/config/application.default.yml  |  4 ----
 services/api/config/database.yml.example     |  5 ++++-
 services/api/config/initializers/eventbus.rb | 13 -------------
 3 files changed, 4 insertions(+), 18 deletions(-)

       via  fa615bfa6748a0b552c4e3a33be1921f0760664e (commit)
      from  27b18bf9b168319660bdde4632ac4c3f359666d6 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit fa615bfa6748a0b552c4e3a33be1921f0760664e
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Tue Jun 21 10:56:57 2016 -0400

    9427: Back out redundant connection pool configuration option and add comment
    to database.yml.example about connection pool and websockets.

diff --git a/services/api/config/application.default.yml b/services/api/config/application.default.yml
index 0e005dc..ddc6eed 100644
--- a/services/api/config/application.default.yml
+++ b/services/api/config/application.default.yml
@@ -80,10 +80,6 @@ common:
   # active.
   websocket_max_filters: 10
 
-  # When using multithreaded websocket server, set the size of the database
-  # connection pool.
-  websocket_db_pool: 50
-
   # Git repositories must be readable by api server, or you won't be
   # able to submit crunch jobs. To pass the test suites, put a clone
   # of the arvados tree in {git_repositories_dir}/arvados.git or
diff --git a/services/api/config/database.yml.example b/services/api/config/database.yml.example
index f58cc11..f995b6a 100644
--- a/services/api/config/database.yml.example
+++ b/services/api/config/database.yml.example
@@ -24,4 +24,7 @@ production:
   username: arvados
   password: xxxxxxxx
   host: localhost
-
+  # For the websockets server, prefer a larger database connection pool size since it
+  # multithreaded and can serve a large number of long-lived clients.  See also
+  # websocket_max_connections configuration option.
+  pool: 50
diff --git a/services/api/config/initializers/eventbus.rb b/services/api/config/initializers/eventbus.rb
index 7c452c3..ea1c210 100644
--- a/services/api/config/initializers/eventbus.rb
+++ b/services/api/config/initializers/eventbus.rb
@@ -13,19 +13,6 @@ Server::Application.configure do
       :websocket_only => (ENV['ARVADOS_WEBSOCKETS'] == "ws-only")
     }
     Rails.logger.info "Websockets #{ENV['ARVADOS_WEBSOCKETS']}, running at /websocket"
-
-    Rails.application.config.after_initialize do
-      ActiveRecord::Base.connection_pool.disconnect!
-
-      ActiveSupport.on_load(:active_record) do
-        config = ActiveRecord::Base.configurations[Rails.env] ||
-                 Rails.application.config.database_configuration[Rails.env]
-        config['pool'] = Rails.application.config.websocket_db_pool
-        ActiveRecord::Base.establish_connection(config)
-        Rails.logger.info "Database connection pool size #{Rails.application.config.websocket_db_pool}"
-      end
-    end
-
   else
     Rails.logger.info "Websockets disabled"
   end

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list