You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Specifically, check for defined? ActiveRecord::Base and Resque.redis. Then we can remove those bits from the necessary config for probably 95% of users (and remove one of the most common misconfigurations). Any other connections will still need to be managed manually (and we will still need to document this in the README).
We should do a quick search for open TCP sockets and issue a warning if any of them were shared from the master. e.g.
# helperdefopen_tcp_socketsreturn[]ifconfigured_to_ignore_open_socket_warnings?ObjectSpace.each_object(TCPSocket).each_with_object({})do |f,h|
fd=f.filenorescuenilh[fd]=fiffd && (!f.closed?rescuenil)end# immediately after forktcp_from_master=open_tcp_sockets# after running the after fork hookscurrent_open_tcp_fds=open_tcp_socket_fds.keys(tcp_from_master.keys & current_open_tcp_fds).eachdo |fd|
socket=tcp_from_master[fd]unlessconfigured_to_ignore_warning_for?(socket)print_warning_for(socket)endend
We could also extend this to open File, IO, UDPSocket, etc, but those are more likely to be legitimately shared between master/worker.
The text was updated successfully, but these errors were encountered:
Intended to be wrapped by `Throttled` config loader.
n.b. if you use this, you will need to reset the redis configuration in your
`after_prefork` hook. (Until #135 handles it automatically.)
Intended to be wrapped by `Throttled` config loader.
n.b. if you use this, you will need to reset the redis configuration in your
`after_prefork` hook. (Until #135 handles it automatically.)
Specifically, check for
defined? ActiveRecord::Base
andResque.redis
. Then we can remove those bits from the necessary config for probably 95% of users (and remove one of the most common misconfigurations). Any other connections will still need to be managed manually (and we will still need to document this in the README).We should do a quick search for open TCP sockets and issue a warning if any of them were shared from the master. e.g.
We could also extend this to open File, IO, UDPSocket, etc, but those are more likely to be legitimately shared between master/worker.
The text was updated successfully, but these errors were encountered: