- xml - AJAX/Jquery XML 解析
- 具有多重继承的 XML 模式
- .net - 枚举序列化 Json 与 XML
- XML 简单类型、简单内容、复杂类型、复杂内容
当使用 ActionMailer 异步发送延迟电子邮件时,我不断收到 OpenSSL::SSL::SSLError
消息 SSL_read: cert already in hash table
。
我们使用 Sidekiq 异步发送所有电子邮件。当在 Sidekiq GitHub 存储库中将这个问题作为一个问题提出时,我被告知 Sidekiq 对 SSL 连接一无所知,也不知道如何管理 SSL 连接。
我们的应用托管在 Heroku 上,它正在运行 OpenSSL 0.9.8k 2009 年 3 月 25 日
。
我们在其他作业中多次看到此错误,并且发现作业有时得到处理,但有时却没有。
这是一个 OpenSSL 线程问题,其中多个 Sidekiq 线程试图使用相同的 SSL 连接吗?有解决办法吗?
这是我们得到的堆栈跟踪:
[PROJECT_ROOT]/vendor/ruby-2.0.0/lib/ruby/2.0.0/openssl/buffering.rb:175:in `sysread_nonblock`
[PROJECT_ROOT]/vendor/ruby-2.0.0/lib/ruby/2.0.0/openssl/buffering.rb:175:in `read_nonblock`
[PROJECT_ROOT]/vendor/ruby-2.0.0/lib/ruby/2.0.0/net/protocol.rb:153:in `rbuf_fill`
[PROJECT_ROOT]/vendor/ruby-2.0.0/lib/ruby/2.0.0/net/protocol.rb:134:in `readuntil`
[PROJECT_ROOT]/vendor/ruby-2.0.0/lib/ruby/2.0.0/net/protocol.rb:144:in `readline`
[PROJECT_ROOT]/vendor/ruby-2.0.0/lib/ruby/2.0.0/net/smtp.rb:932:in `recv_response`
[PROJECT_ROOT]/vendor/ruby-2.0.0/lib/ruby/2.0.0/net/smtp.rb:903:in `block in data`
[PROJECT_ROOT]/vendor/ruby-2.0.0/lib/ruby/2.0.0/net/smtp.rb:942:in `critical`
[PROJECT_ROOT]/vendor/ruby-2.0.0/lib/ruby/2.0.0/net/smtp.rb:896:in `data`
[PROJECT_ROOT]/vendor/ruby-2.0.0/lib/ruby/2.0.0/net/smtp.rb:663:in `block in send_message`
[PROJECT_ROOT]/vendor/ruby-2.0.0/lib/ruby/2.0.0/net/smtp.rb:852:in `rcptto_list`
[PROJECT_ROOT]/vendor/ruby-2.0.0/lib/ruby/2.0.0/net/smtp.rb:663:in `send_message`
[PROJECT_ROOT]/vendor/bundle/ruby/2.0.0/gems/mail-2.5.4/lib/mail/network/delivery_methods/smtp.rb:113:in `block in deliver!`
[PROJECT_ROOT]/vendor/ruby-2.0.0/lib/ruby/2.0.0/net/smtp.rb:521:in `start`
[PROJECT_ROOT]/vendor/bundle/ruby/2.0.0/gems/mail-2.5.4/lib/mail/network/delivery_methods/smtp.rb:112:in `deliver!`
[PROJECT_ROOT]/vendor/bundle/ruby/2.0.0/gems/mail-2.5.4/lib/mail/message.rb:2129:in `do_delivery`
[PROJECT_ROOT]/vendor/bundle/ruby/2.0.0/gems/mail-2.5.4/lib/mail/message.rb:232:in `block in deliver`
[PROJECT_ROOT]/vendor/bundle/ruby/2.0.0/gems/actionmailer-4.0.3/lib/action_mailer/base.rb:456:in `block in deliver_mail`
[PROJECT_ROOT]/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.3/lib/active_support/notifications.rb:159:in `block in instrument`
[PROJECT_ROOT]/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.3/lib/active_support/notifications/instrumenter.rb:20:in `instrument`
[PROJECT_ROOT]/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.3/lib/active_support/notifications.rb:159:in `instrument`
[PROJECT_ROOT]/vendor/bundle/ruby/2.0.0/gems/actionmailer-4.0.3/lib/action_mailer/base.rb:454:in `deliver_mail`
[PROJECT_ROOT]/vendor/bundle/ruby/2.0.0/gems/mail-2.5.4/lib/mail/message.rb:232:in `deliver`
[PROJECT_ROOT]/vendor/bundle/ruby/2.0.0/gems/sidekiq-2.17.2/lib/sidekiq/extensions/action_mailer.rb:20:in `perform`
[PROJECT_ROOT]/vendor/bundle/ruby/2.0.0/gems/sidekiq-2.17.2/lib/sidekiq/processor.rb:49:in `block (3 levels) in process`
[PROJECT_ROOT]/vendor/bundle/ruby/2.0.0/gems/sidekiq-2.17.2/lib/sidekiq/middleware/chain.rb:122:in `call`
[PROJECT_ROOT]/vendor/bundle/ruby/2.0.0/gems/sidekiq-2.17.2/lib/sidekiq/middleware/chain.rb:122:in `block in invoke`
[PROJECT_ROOT]/vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.7.1.182/lib/new_relic/agent/instrumentation/sidekiq.rb:30:in `block in call`
[PROJECT_ROOT]/vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.7.1.182/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:339:in `perform_action_with_newrelic_trace`
[PROJECT_ROOT]/vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.7.1.182/lib/new_relic/agent/instrumentation/sidekiq.rb:21:in `call`
[PROJECT_ROOT]/vendor/bundle/ruby/2.0.0/gems/sidekiq-2.17.2/lib/sidekiq/middleware/chain.rb:124:in `block in invoke`
[PROJECT_ROOT]/vendor/bundle/ruby/2.0.0/gems/sidekiq-failures-0.3.0/lib/sidekiq/failures/middleware.rb:10:in `call`
[PROJECT_ROOT]/vendor/bundle/ruby/2.0.0/gems/sidekiq-2.17.2/lib/sidekiq/middleware/chain.rb:124:in `block in invoke`
[PROJECT_ROOT]/vendor/bundle/ruby/2.0.0/gems/sidekiq-unique-jobs-2.7.0/lib/sidekiq-unique-jobs/middleware/server/unique_jobs.rb:15:in `call`
[PROJECT_ROOT]/vendor/bundle/ruby/2.0.0/gems/sidekiq-2.17.2/lib/sidekiq/middleware/chain.rb:124:in `block in invoke`
[PROJECT_ROOT]/vendor/bundle/ruby/2.0.0/gems/sidekiq-2.17.2/lib/sidekiq/middleware/server/active_record.rb:6:in `call`
[PROJECT_ROOT]/vendor/bundle/ruby/2.0.0/gems/sidekiq-2.17.2/lib/sidekiq/middleware/chain.rb:124:in `block in invoke`
[PROJECT_ROOT]/vendor/bundle/ruby/2.0.0/gems/sidekiq-2.17.2/lib/sidekiq/middleware/server/retry_jobs.rb:62:in `call`
[PROJECT_ROOT]/vendor/bundle/ruby/2.0.0/gems/sidekiq-2.17.2/lib/sidekiq/middleware/chain.rb:124:in `block in invoke`
[PROJECT_ROOT]/vendor/bundle/ruby/2.0.0/gems/sidekiq-2.17.2/lib/sidekiq/middleware/server/logging.rb:11:in `block in call`
[PROJECT_ROOT]/vendor/bundle/ruby/2.0.0/gems/sidekiq-2.17.2/lib/sidekiq/logging.rb:22:in `with_context`
[PROJECT_ROOT]/vendor/bundle/ruby/2.0.0/gems/sidekiq-2.17.2/lib/sidekiq/middleware/server/logging.rb:7:in `call`
[PROJECT_ROOT]/vendor/bundle/ruby/2.0.0/gems/sidekiq-2.17.2/lib/sidekiq/middleware/chain.rb:124:in `block in invoke`
[PROJECT_ROOT]/vendor/bundle/ruby/2.0.0/gems/sidekiq-2.17.2/lib/sidekiq/middleware/chain.rb:127:in `call`
[PROJECT_ROOT]/vendor/bundle/ruby/2.0.0/gems/sidekiq-2.17.2/lib/sidekiq/middleware/chain.rb:127:in `invoke`
[PROJECT_ROOT]/vendor/bundle/ruby/2.0.0/gems/sidekiq-2.17.2/lib/sidekiq/processor.rb:48:in `block (2 levels) in process`
[PROJECT_ROOT]/vendor/bundle/ruby/2.0.0/gems/sidekiq-2.17.2/lib/sidekiq/processor.rb:105:in `stats`
[PROJECT_ROOT]/vendor/bundle/ruby/2.0.0/gems/sidekiq-2.17.2/lib/sidekiq/processor.rb:47:in `block in process`
[PROJECT_ROOT]/vendor/bundle/ruby/2.0.0/gems/sidekiq-2.17.2/lib/sidekiq/processor.rb:86:in `do_defer`
[PROJECT_ROOT]/vendor/bundle/ruby/2.0.0/gems/sidekiq-2.17.2/lib/sidekiq/processor.rb:37:in `process`
[PROJECT_ROOT]/vendor/bundle/ruby/2.0.0/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in `public_send`
[PROJECT_ROOT]/vendor/bundle/ruby/2.0.0/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in `dispatch`
[PROJECT_ROOT]/vendor/bundle/ruby/2.0.0/gems/celluloid-0.15.2/lib/celluloid/calls.rb:122:in `dispatch`
[PROJECT_ROOT]/vendor/bundle/ruby/2.0.0/gems/celluloid-0.15.2/lib/celluloid/actor.rb:322:in `block in handle_message`
[PROJECT_ROOT]/vendor/bundle/ruby/2.0.0/gems/celluloid-0.15.2/lib/celluloid/actor.rb:416:in `block in task`
[PROJECT_ROOT]/vendor/bundle/ruby/2.0.0/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:55:in `block in initialize`
[PROJECT_ROOT]/vendor/bundle/ruby/2.0.0/gems/celluloid-0.15.2/lib/celluloid/tasks/task_fiber.rb:13:in `block in create
最佳答案
这与 Ruby concurrency issue 有关在 2.3 版的补丁中修复
您的日志表明您的应用正在运行 2.0.0
。将语言版本至少更新到 2.3 的稳定版本将解决该问题。这可以通过更改 Gemfile
Ruby 声明轻松完成:
ruby '2.3.8'
关于ruby-on-rails - "SSL_read: cert already in hash table"异步发送邮件时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22210010/
我正在尝试使用 Rust 的 std::hash 函数: use std::hash::{hash, Hash, SipHasher}; #[test] fn hash_test() { pr
我有以下内容 friends = [{ name: "Jack", attr1:"def", attr2:"def" }, { name: "Jill", attr1:"def", attr2:"de
我有以下数组: names = [ {"Adriana"=>{:gender=>"female", :nationality=>"danish"}}, {"Adriane"=>{:gender=>"f
我有一个哈希的 Perl 哈希......大约 11 或 12 个元素深。请原谅我没有重复下面的结构! 一些级别有固定的标签,例如'NAMES' , 'AGES'或类似的,因此访问这些级别很好,因为我
我试图派生一个描述结构化值的Graphviz文件。这是出于诊断目的,因此我希望我的图形尽可能接近地反射(reflect)内存中的实际结构。我正在使用下面的方法将值映射到Graphviz顶点,以便当一个
我正在尝试获取在 xlm 中传递的事件日志条目,将它们转换为散列,然后存储到数据库中。 我目前正在使用 XmlSimple gem 将 xml 输入转换为散列。 测试样本输入: require 'xm
对于 Ruby 中的 Hash,reject! 和 reject 与 delete_if 有何不同?谁能用简单的代码片段解释它们之间的区别? 最佳答案 由于其他答案指的是 Array#delete_i
我正在尝试处理我使用 Data::Dumper 输出的 perl 数据结构 $VAR1 = 'GAHD'; $VAR2 = [ { 'COUNTRY' => 'US',
无法使用来自辅助进程的现有 rte Hash: h = rte_hash_find_existing("some_hash"); if (h) { // this will w
我有一个散列的散列,其中第一个键是一个字符串,第二个键是一个整数。我试图在散列的散列中获得最低的第二个键。这是我的哈希。 %HoH = ( flintstones => { 8
如何从一系列数组中生成哈希中的哈希?我需要从这里开始: my @data = /one two three/; my $value = 13: 为此: $hoh = { 'one' => { 'two
我有这个配置文件 dbUser=customer dbPass=passwrd dbSid=customer.shadow passwdFile=/production/etc-user tmpUse
我想实现一种thing,可以唯一标识,除此之外,它不包含其他字段。它有点像 ruby 中的 BasicObject 或 java 中的 Object。 我添加了一个 PartialEq 特征。 s
我正在尝试使用以下键存储二维哈希: 维度 1 = 数字但不连续 维度 2 = 字符串(如 :id 和 :value) 当元素未初始化时会出现问题。 memory = Hash.new(Hash.new
我目前正在学习 Michael Hartl 的 Ruby on Rails 教程 不理解在 section 4.4.1 中找到的此语句的含义: Hashes, in contrast, are dif
我很乐意通过更短的表达式访问多维哈希数组的任何元素 h = {a: {b: 'c'}} # default way p h[:a][:b] # => "c" # a nicer way p h[:a,
我想在编写 flutter channel beta 后运行 flutter web 它回复:Can't load kernel binary:Invalid SDK hash,你知道如何解决这个问题
我最近正在研究 Amazon 提供的新 NoSQL 服务,更具体地说是 DynamoDB。 亚马逊说你应该避免使用不均匀分布的键作为主键,即主键应该越独特越好。我可以认为这是最好的情况下每个项目都有唯
我的游戏中有很多哈希值,例如 HMSET('hash1', 'level', 25, 'connected', 2) HMSET('hash2', 'level', 50, 'connected',
我必须翻译这句话:'Susspected overpass-the-hash attack (Kerberos)' 我发现了这篇关于立交桥哈希的文章:https://blog.stealthbits.
我是一名优秀的程序员,十分优秀!