Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

update to new rails and use em_mysql2 driver

  • Loading branch information...
commit 1618e996d14bfe546b4088137576fba26525779d 1 parent c8e78b3
@igrigorik authored
Showing with 6 additions and 7 deletions.
  1. +3 −4 Gemfile
  2. +3 −3 config/database.yml
View
7 Gemfile
@@ -1,6 +1,6 @@
source 'http://rubygems.org'
-gem 'rails', '3.0.1'
+gem 'rails', '3.0.4'
gem 'sinatra'
# async wrappers
@@ -12,11 +12,10 @@ gem 'em-synchrony', :git => 'git://github.com/igrigorik/em-synchrony.git', :
]
# async activerecord requires
-gem 'mysqlplus', :git => 'git://github.com/oldmoe/mysqlplus.git', :require => 'mysqlplus'
-gem 'em-mysqlplus', :git => 'git://github.com/igrigorik/em-mysqlplus.git', :require => 'em-activerecord'
+gem 'mysql2'
# async http requires
gem 'em-http-request',:git => 'git://github.com/igrigorik/em-http-request.git', :require => 'em-http'
gem 'addressable', :require => 'addressable/uri'
-gem 'thin'
+gem 'thin'
View
6 config/database.yml
@@ -1,7 +1,7 @@
# SQLite version 3.x
# gem install sqlite3-ruby (not necessary on OS X Leopard)
development:
- adapter: em_mysqlplus
+ adapter: em_mysql2
database: widgets
username: root
pool: 250
@@ -11,14 +11,14 @@ development:
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
- adapter: em_mysqlplus
+ adapter: em_mysql2
database: widgets_test
username: root
pool: 5
timeout: 5000
production:
- adapter: em_mysqlplus
+ adapter: em_mysql2
database: widgets
username: root
pool: 200

4 comments on commit 1618e99

@mikewadhera

Curious if you've been successful with the em_mysql2 adapter? I keep getting a deadlock error when running ab with >1 concurrency (on async-rails master)

@igrigorik
Owner

Hmm, yep, no problems here...

Concurrency Level: 10
Time taken for tests: 1.024 seconds
Complete requests: 10
Failed requests: 0
Write errors: 0
Total transferred: 2700 bytes
HTML transferred: 60 bytes
Requests per second: 9.77 #/sec

ab -c 10 -n 10 "http://127.0.0.1:3000/widgets"

Am I missing something?

@mikewadhera

Ah, found my problem: I had removed config.threadsafe! from development.rb while testing... would explain the deadlock :-)

@igrigorik
Owner

that would do it! :)

Please sign in to comment.
Something went wrong with that request. Please try again.