Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
Extracted source (around line #90):
88
89
90
91
92
93
|
conn_attrs = parse_connect_attrs(opts[:connect_attrs])
connect user, pass, host, port, database, socket, flags, conn_attrs
end
def parse_ssl_mode(mode)
|
Extracted source (around line #90):
88
89
90
91
92
93
|
conn_attrs = parse_connect_attrs(opts[:connect_attrs])
connect user, pass, host, port, database, socket, flags, conn_attrs
end
def parse_ssl_mode(mode)
|
Extracted source (around line #25):
23
24
25
26
27
28
|
end
client = Mysql2::Client.new(config)
ConnectionAdapters::Mysql2Adapter.new(client, logger, nil, config)
rescue Mysql2::Error => error
if error.message.include?("Unknown database")
|
Extracted source (around line #25):
23
24
25
26
27
28
|
end
client = Mysql2::Client.new(config)
ConnectionAdapters::Mysql2Adapter.new(client, logger, nil, config)
rescue Mysql2::Error => error
if error.message.include?("Unknown database")
|
Extracted source (around line #729):
727
728
729
730
731
732
|
def new_connection
Base.send(spec.adapter_method, spec.config).tap do |conn|
conn.schema_cache = schema_cache.dup if schema_cache
end
end
|
Extracted source (around line #773):
771
772
773
774
775
776
|
def checkout_new_connection
raise ConnectionNotEstablished unless @automatic_reconnect
new_connection
end
def checkout_and_verify(c)
|
Extracted source (around line #752):
750
751
752
753
754
755
|
# if successfully incremented @now_connecting establish new connection
# outside of synchronized section
conn = checkout_new_connection
ensure
synchronize do
if conn
|
Extracted source (around line #713):
711
712
713
714
715
716
|
# and +try_to_checkout_new_connection+ we can piggyback on +synchronize+ sections
# of the said methods and avoid an additional +synchronize+ overhead.
if conn = @available.poll || try_to_checkout_new_connection
conn
else
reap
|
Extracted source (around line #490):
488
489
490
491
492
493
|
# - ActiveRecord::ConnectionTimeoutError no connection can be obtained from the pool.
def checkout(checkout_timeout = @checkout_timeout)
checkout_and_verify(acquire_connection(checkout_timeout))
end
# Check-in a database connection back into the pool, indicating that you
|
Extracted source (around line #364):
362
363
364
365
366
367
|
# held in a cache keyed by a thread.
def connection
@thread_cached_conns[connection_cache_key(Thread.current)] ||= checkout
end
# Is there an open connection that is being used for the current thread?
|
Extracted source (around line #883):
881
882
883
884
885
886
|
pool = retrieve_connection_pool(spec_name)
raise ConnectionNotEstablished, "No connection pool with id #{spec_name} found." unless pool
conn = pool.connection
raise ConnectionNotEstablished, "No connection for #{spec_name} in connection pool" unless conn
conn
end
|
Extracted source (around line #128):
126
127
128
129
130
131
|
def retrieve_connection
connection_handler.retrieve_connection(connection_specification_name)
end
# Returns +true+ if Active Record is connected.
|
Extracted source (around line #91):
89
90
91
92
93
94
|
# to any of the specific Active Records.
def connection
retrieve_connection
end
attr_writer :connection_specification_name
|
Extracted source (around line #559):
557
558
559
560
561
562
|
def connection
ActiveRecord::Base.connection
end
end
|
Extracted source (around line #546):
544
545
546
547
548
549
|
def call(env)
if connection.supports_migrations?
mtime = ActiveRecord::Migrator.last_migration.mtime.to_i
if @last_check < mtime
ActiveRecord::Migration.check_pending!(connection)
|
Extracted source (around line #38):
36
37
38
39
40
41
|
result = run_callbacks :call do
begin
@app.call(env)
rescue => error
end
end
|
Extracted source (around line #97):
95
96
97
98
99
100
|
def __run_callbacks__(callbacks, &block)
if callbacks.empty?
yield if block_given?
else
runner = callbacks.compile
e = Filters::Environment.new(self, false, nil, block)
|
Extracted source (around line #750):
748
749
750
751
752
753
|
module_eval <<-RUBY, __FILE__, __LINE__ + 1
def _run_#{name}_callbacks(&block)
__run_callbacks__(_#{name}_callbacks, &block)
end
RUBY
end
|
Extracted source (around line #90):
88
89
90
91
92
93
|
# end
def run_callbacks(kind, &block)
send "_run_#{kind}_callbacks", &block
end
private
|
Extracted source (around line #36):
34
35
36
37
38
39
|
def call(env)
error = nil
result = run_callbacks :call do
begin
@app.call(env)
rescue => error
|
Extracted source (around line #12):
10
11
12
13
14
15
|
state = @executor.run!
begin
response = @app.call(env)
returned = response << ::Rack::BodyProxy.new(response.pop) { state.complete! }
ensure
state.complete! unless returned
|
Extracted source (around line #79):
77
78
79
80
81
82
|
req = ActionDispatch::Request.new env
req.remote_ip = GetIp.new(req, check_ip, proxies)
@app.call(req.env)
end
# The GetIp class exists as a way to defer processing of the request data
|
Extracted source (around line #49):
47
48
49
50
51
52
|
def call(env)
request = ActionDispatch::Request.new env
_, headers, body = response = @app.call(env)
if headers['X-Cascade'] == 'pass'
body.close if body.respond_to?(:close)
|
Extracted source (around line #135):
133
134
135
136
137
138
|
def call_app(env)
@app.call(env)
rescue => e
throw :app_exception, e
end
|
Extracted source (around line #22):
20
21
22
23
24
25
|
app_exception = catch :app_exception do
request = create_regular_or_whiny_request(env)
return call_app(env) unless request.from_whitelisted_ip?
if id = id_for_repl_session_update(request)
return update_repl_session(id, request)
|
Extracted source (around line #20):
18
19
20
21
22
23
|
def call(env)
app_exception = catch :app_exception do
request = create_regular_or_whiny_request(env)
return call_app(env) unless request.from_whitelisted_ip?
|
Extracted source (around line #20):
18
19
20
21
22
23
|
def call(env)
app_exception = catch :app_exception do
request = create_regular_or_whiny_request(env)
return call_app(env) unless request.from_whitelisted_ip?
|
Extracted source (around line #31):
29
30
31
32
33
34
|
def call(env)
request = ActionDispatch::Request.new env
@app.call(env)
rescue Exception => exception
if request.show_exceptions?
render_exception(request, exception)
|
Extracted source (around line #36):
34
35
36
37
38
39
|
instrumenter.start 'request.action_dispatch', request: request
logger.info { started_request_message(request) }
resp = @app.call(env)
resp[2] = ::Rack::BodyProxy.new(resp[2]) { finish(request) }
resp
rescue Exception
|
Extracted source (around line #24):
22
23
24
25
26
27
|
if logger.respond_to?(:tagged)
logger.tagged(compute_tags(request)) { call_app(request, env) }
else
call_app(request, env)
end
|
Extracted source (around line #69):
67
68
69
70
71
72
|
def tagged(*tags)
formatter.tagged(*tags) { yield self }
end
def flush
|
Extracted source (around line #26):
24
25
26
27
28
29
|
def tagged(*tags)
new_tags = push_tags(*tags)
yield self
ensure
pop_tags(new_tags.size)
end
|
Extracted source (around line #69):
67
68
69
70
71
72
|
def tagged(*tags)
formatter.tagged(*tags) { yield self }
end
def flush
|
Extracted source (around line #24):
22
23
24
25
26
27
|
if logger.respond_to?(:tagged)
logger.tagged(compute_tags(request)) { call_app(request, env) }
else
call_app(request, env)
end
|
Extracted source (around line #13):
11
12
13
14
15
16
|
::Rails.logger.silence { @app.call(env) }
else
@app.call(env)
end
end
end
|
Extracted source (around line #24):
22
23
24
25
26
27
|
req = ActionDispatch::Request.new env
req.request_id = make_request_id(req.x_request_id)
@app.call(env).tap { |_status, headers, _body| headers[X_REQUEST_ID] = req.request_id }
end
private
|
Extracted source (around line #22):
20
21
22
23
24
25
|
end
@app.call(env)
end
def method_override(env)
|
Extracted source (around line #22):
20
21
22
23
24
25
|
def call(env)
start_time = Utils.clock_time
status, headers, body = @app.call(env)
request_time = Utils.clock_time - start_time
unless headers.has_key?(@header_name)
|
Extracted source (around line #28):
26
27
28
29
30
31
|
def call(env)
LocalCacheRegistry.set_cache_for(local_cache_key, LocalStore.new)
response = @app.call(env)
response[2] = ::Rack::BodyProxy.new(response[2]) do
LocalCacheRegistry.set_cache_for(local_cache_key, nil)
end
|
Extracted source (around line #12):
10
11
12
13
14
15
|
state = @executor.run!
begin
response = @app.call(env)
returned = response << ::Rack::BodyProxy.new(response.pop) { state.complete! }
ensure
state.complete! unless returned
|
Extracted source (around line #136):
134
135
136
137
138
139
|
end
@app.call(req.env)
end
end
end
|
Extracted source (around line #111):
109
110
111
112
113
114
|
def call(env)
status, headers, body = @app.call(env)
if body.respond_to?(:to_path)
case type = variation(env)
when 'X-Accel-Redirect'
|
Extracted source (around line #522):
520
521
522
523
524
525
|
def call(env)
req = build_request env
app.call req.env
end
# Defines additional Rack env configuration that is added on each call.
|
Extracted source (around line #107):
105
106
107
108
109
110
|
begin
status, headers, body = @app.call(env)
rescue => e
if e.is_a?(Errno::ENOBUFS)
raise e
|
Extracted source (around line #149):
147
148
149
150
151
152
|
begin
if headers[REQUEST_METHOD] == GET
process_request(headers, connection, socket_wrapper, @protocol == :http)
elsif headers[REQUEST_METHOD] == PING
process_ping(headers, connection)
false
|
Extracted source (around line #110):
108
109
110
111
112
113
|
finish_callback.call
while true
hijacked = accept_and_process_next_request(socket_wrapper, channel, buffer)
socket_wrapper = Utils::UnseekableSocket.new if hijacked
end
rescue Interrupted
|
Extracted source (around line #419):
417
418
419
420
421
422
|
handler = thread_handler.new(self, main_socket_options)
handler.install
handler.main_loop(set_initialization_state_to_true)
ensure
set_initialization_state.call(false)
unregister_current_thread
|
Extracted source (around line #113):
111
112
113
114
115
116
|
Thread.current.abort_on_exception = true
begin
yield(*args)
rescue SystemExit
raise
rescue Exception => e
|
Rails.root: /sites/whimsicalexpress.com
Request
Parameters:
None
HTTP_ACCEPT: "*/*"
HTTP_VERSION: "HTTP/1.1"
ORIGINAL_SCRIPT_NAME: ""
REMOTE_ADDR: "3.236.145.110"
SERVER_NAME: "rudolph.whimsicalexpress.com"
SERVER_PROTOCOL: "HTTP/1.1"
Response
Headers:
None