我正在尝试在 MongoDB 中插入文档。我当前的版本是 2.6 生产版本。我的应用程序能够插入少量文档,但在某个时间点后开始出现以下错误。我每次都遇到同样的错误。我正在从 cmd 提示符运行 mongod。我在 2.6.0 rc 和 2.6.1 rc 中遇到了同样的问题,但在 2.5.4 中工作正常。 下面是日志跟踪。
2014-04-08T20:04:01.373+0000 [conn12] command deadlinedb.$cmd command: insert { $msg: "query not recording (too large)" } keyUpdates:0 numYields:0 locks(micros) w:40 reslen:40 18ms
2014-04-08T20:04:01.612+0000 [conn15] update deadlinedb.DeadlineSettings query: { _id: "history_log" } update: { $push: { Entries: "2014/04/08 15:04:00 vibhu MOBILE-019 (MOBILE-019\Vibhu): Submitted new job: (tyler.jordan,"Among assumed stumbles v051",92:none:none,2014/04/08 15:04:00,)." }, $inc: { EntryCount: 1 } } nscanned:1 nscannedObjects:1 nMatched:1 nModified:1 keyUpdates:0 numYields:0 locks(micros) w:5621 21ms
2014-04-08T20:04:01.612+0000 [conn15] command deadlinedb.$cmd command: update { update: "DeadlineSettings", ordered: true, updates: [ { q: { _id: "history_log" }, u: { $push: { Entries: "2014/04/08 15:04:00 vibhu MOBILE-019 (MOBILE-019\Vibhu): Submitted new job: (tyler.jordan,"Among assumed stumbles v051",92:none:none,2014/04/08 15:04:00,)." }, $inc: { EntryCount: 1 } }, multi: false, upsert: true } ] } keyUpdates:0 numYields:0 reslen:55 22ms
2014-04-08T20:04:01.681+0000 [conn12] command deadlinedb.$cmd command: insert { $msg: "query not recording (too large)" } keyUpdates:0 numYields:0 locks(micros) w:23 reslen:40 16ms
2014-04-08T20:04:01.727+0000 [conn12] update deadlinedb.LimitGroups query: { _id: "534456307f87b2196c09841b" } update: { $set: { IsSub: false }, $currentDate: { LastWriteTime: { $type: "date" } } } nscanned:1 nscannedObjects:1 nMatched:1 nModified:1 keyUpdates:1 numYields:0 locks(micros) w:161 17ms
2014-04-08T20:04:01.727+0000 [conn12] command deadlinedb.$cmd command: update { update: "LimitGroups", ordered: true, updates: [ { q: { _id: "534456307f87b2196c09841b" }, u: { $set: { IsSub: false }, $currentDate: { LastWriteTime: { $type: "date" } } }, multi: false, upsert: false } ] } keyUpdates:0 numYields:0 reslen:55 17ms
2014-04-08T20:04:02.676+0000 [conn15] command deadlinedb.$cmd command: insert { $msg: "query not recording (too large)" } keyUpdates:0 numYields:0 locks(micros) w:21 reslen:40 11ms
2014-04-08T20:04:02.676+0000 [conn12] update deadlinedb.Jobs query: { _id: "534456317f87b2196c098426" } update: { $set: { IsSub: false }, $currentDate: { LastWriteTime: { $type: "date" } } } nscanned:1 nscannedObjects:1 nMatched:1 nModified:1 keyUpdates:1 numYields:0 locks(micros) w:89 17ms
2014-04-08T20:04:02.676+0000 [conn12] command deadlinedb.$cmd command: update { update: "Jobs", ordered: true, updates: [ { q: { _id: "534456317f87b2196c098426" }, u: { $set: { IsSub: false }, $currentDate: { LastWriteTime: { $type: "date" } } }, multi: false, upsert: false } ] } keyUpdates:0 numYields:0 reslen:55 17ms
2014-04-08T20:04:03.165+0000 [conn12] insert deadlinedb.JobTasks query: { _id: "534456327f87b2196c09842b_11", JobID: "534456327f87b2196c09842b", TaskID: 11, Frames: "11-11", Slave: "", Stat: 2, Errs: 0, Start: new Date(-62135596800000), StartRen: new Date(-62135596800000), Comp: new Date(-62135596800000), WtgStrt: false } ninserted:1 keyUpdates:0 numYields:0 locks(micros) w:150875 151ms
2014-04-08T20:04:03.178+0000 [conn12] command deadlinedb.$cmd command: insert { $msg: "query not recording (too large)" } keyUpdates:0 numYields:0 locks(micros) w:259 reslen:40 166ms
2014-04-08T20:04:03.526+0000 [conn15] insert deadlinedb.JobTasks query: { _id: "534456327f87b2196c098430_0", JobID: "534456327f87b2196c098430", TaskID: 0, Frames: "0-9", Slave: "", Stat: 2, Errs: 0, Start: new Date(-62135596800000), StartRen: new Date(-62135596800000), Comp: new Date(-62135596800000), WtgStrt: false } ninserted:1 keyUpdates:0 numYields:0 locks(micros) w:12295 12ms
2014-04-08T20:04:03.529+0000 [conn15] command deadlinedb.$cmd command: insert { $msg: "query not recording (too large)" } keyUpdates:0 numYields:0 locks(micros) w:12 reslen:40 16ms
2014-04-08T20:04:03.710+0000 [conn15] command deadlinedb.$cmd command: insert { $msg: "query not recording (too large)" } keyUpdates:0 numYields:0 locks(micros) w:22 reslen:40 30ms
2014-04-08T20:04:04.042+0000 [conn12] insert deadlinedb.JobTasks query: { _id: "534456337f87b2196c098435_22", JobID: "534456337f87b2196c098435", TaskID: 22, Frames: "132-137", Slave: "", Stat: 2, Errs: 0, Start: new Date(-62135596800000), StartRen: new Date(-62135596800000), Comp: new Date(-62135596800000), WtgStrt: false } ninserted:1 keyUpdates:0 numYields:0 locks(micros) w:15158 15ms
2014-04-08T20:04:04.043+0000 [conn12] command deadlinedb.$cmd command: insert { $msg: "query not recording (too large)" } keyUpdates:0 numYields:0 locks(micros) w:49 reslen:40 17ms
2014-04-08T20:04:04.072+0000 [conn15] SEVERE: Invalid access at address: 0x20069d1e02
2014-04-08T20:04:04.081+0000 [conn15] SEVERE: Got signal: 11 (Segmentation fault).
Backtrace:0x11bd301 0x11bc6de 0x11bc7cf 0x7f659066acb0 0x796892 0x796fbf 0x79773d 0x78f974 0x78fd42 0xc220ee 0xc430b9 0xc3ce61 0xc48ca6 0xb8f1c9 0xb993e8 0x76b76f 0x117367b 0x7f6590662e9a 0x7f658f9753fd
mongod(_ZN5mongo15printStackTraceERSo+0x21) [0x11bd301]
mongod() [0x11bc6de]
mongod() [0x11bc7cf]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xfcb0) [0x7f659066acb0]
mongod(_ZNK5mongo11mutablebson8Document4Impl12writeElementINS_16BSONArrayBuilderEEEvjPT_PKNS_10StringDataE+0x52) [0x796892]
mongod(_ZNK5mongo11mutablebson8Document4Impl13writeChildrenINS_16BSONArrayBuilderEEEvjPT_+0x4f) [0x796fbf]
mongod(_ZNK5mongo11mutablebson8Document4Impl12writeElementINS_14BSONObjBuilderEEEvjPT_PKNS_10StringDataE+0x22d) [0x79773d]
mongod(_ZN5mongo11mutablebson8Document11makeElementENS0_12ConstElementEPKNS_10StringDataE+0x64) [0x78f974]
mongod(_ZN5mongo11mutablebson8Document27makeElementWithNewFieldNameERKNS_10StringDataENS0_12ConstElementE+0x22) [0x78fd42]
mongod(_ZNK5mongo11ModifierPop3logEPNS_10LogBuilderE+0x10e) [0xc220ee]
mongod(_ZN5mongo12UpdateDriver6updateERKNS_10StringDataEPNS_11mutablebson8DocumentEPNS_7BSONObjEPNS_11FieldRefSetE+0x319) [0xc430b9]
mongod(_ZN5mongo6updateERKNS_13UpdateRequestEPNS_7OpDebugEPNS_12UpdateDriverEPNS_14CanonicalQueryE+0xc71) [0xc3ce61]
mongod(_ZN5mongo14UpdateExecutor7executeEv+0x66) [0xc48ca6]
mongod(_ZN5mongo14receivedUpdateERNS_7MessageERNS_5CurOpE+0x729) [0xb8f1c9]
mongod(_ZN5mongo16assembleResponseERNS_7MessageERNS_10DbResponseERKNS_11HostAndPortE+0xec8) [0xb993e8]
mongod(_ZN5mongo16MyMessageHandler7processERNS_7MessageEPNS_21AbstractMessagingPortEPNS_9LastErrorE+0x9f) [0x76b76f]
mongod(_ZN5mongo17PortMessageServer17handleIncomingMsgEPv+0x4fb) [0x117367b]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x7e9a) [0x7f6590662e9a]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7f658f9753fd]
你能尽快看看这个吗?如果需要更多信息,请告诉我。
谢谢!
维布
最佳答案
只是因为没有人添加答案,所以我会。
这是 Mongo 2.6.0 中的错误,您可以在 Mongo Jira 中查看报告.
ISSUE SUMMARY Issuing an update to an array where more than 128 BSON elements of the document (not limited to the array itself) are traversed during the update may result in a crash of the mongod process. Affected update operators include {$pop: {: -1}} (from the front) and positional updates with .$ or . where is a numeric value.
USER IMPACT Users updating large arrays with $pop or positional operators are affected most, but the limit of 128 BSON elements applies to the entire document, not just the array. The failed update will crash the primary (and any primary nodes that are subsequently elected, if the application repeats the update against one of those nodes). Deployments will suffer downtime until the cluster can be downgraded, but no data loss / data corruption will be incurred.
在2.6.0 版本中没有什么可以做的。解决方法是升级到 2.6.1 或更高版本或降级到 2.4.x 分支。
关于Mongodb 因地址无效访问而崩溃 - 段错误信号 11 - 版本 2.6,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22947465/
类classAprivatedeffooputs:fooendpublicdefbarputs:barendprivatedefzimputs:zimendprotecteddefdibputs:dibendendA的实例a=A.new测试a.foorescueputs:faila.barrescueputs:faila.zimrescueputs:faila.dibrescueputs:faila.gazrescueputs:fail测试输出failbarfailfailfail.发送测试[:foo,:bar,:zim,:dib,:gaz].each{|m|a.send(m)resc
大约一年前,我决定确保每个包含非唯一文本的Flash通知都将从模块中的方法中获取文本。我这样做的最初原因是为了避免一遍又一遍地输入相同的字符串。如果我想更改措辞,我可以在一个地方轻松完成,而且一遍又一遍地重复同一件事而出现拼写错误的可能性也会降低。我最终得到的是这样的:moduleMessagesdefformat_error_messages(errors)errors.map{|attribute,message|"Error:#{attribute.to_s.titleize}#{message}."}enddeferror_message_could_not_find(obje
为了将Cucumber用于命令行脚本,我按照提供的说明安装了arubagem。它在我的Gemfile中,我可以验证是否安装了正确的版本并且我已经包含了require'aruba/cucumber'在'features/env.rb'中为了确保它能正常工作,我写了以下场景:@announceScenario:Testingcucumber/arubaGivenablankslateThentheoutputfrom"ls-la"shouldcontain"drw"假设事情应该失败。它确实失败了,但失败的原因是错误的:@announceScenario:Testingcucumber/ar
我有一个包含模块的模型。我想在模块中覆盖模型的访问器方法。例如:classBlah这显然行不通。有什么想法可以实现吗? 最佳答案 您的代码看起来是正确的。我们正在毫无困难地使用这个确切的模式。如果我没记错的话,Rails使用#method_missing作为属性setter,因此您的模块将优先,阻止ActiveRecord的setter。如果您正在使用ActiveSupport::Concern(参见thisblogpost),那么您的实例方法需要进入一个特殊的模块:classBlah
我正在使用Sequel构建一个愿望list系统。我有一个wishlists和itemstable和一个items_wishlists连接表(该名称是续集选择的名称)。items_wishlists表还有一个用于facebookid的额外列(因此我可以存储opengraph操作),这是一个NOTNULL列。我还有Wishlist和Item具有续集many_to_many关联的模型已建立。Wishlist类也有:selectmany_to_many关联的选项设置为select:[:items.*,:items_wishlists__facebook_action_id].有没有一种方法可以
当我在Rails控制台中按向上或向左箭头时,出现此错误:irb(main):001:0>/Users/me/.rvm/gems/ruby-2.0.0-p247/gems/rb-readline-0.4.2/lib/rbreadline.rb:4269:in`blockin_rl_dispatch_subseq':invalidbytesequenceinUTF-8(ArgumentError)我使用rvm来管理我的ruby安装。我正在使用=>ruby-2.0.0-p247[x86_64]我使用bundle来管理我的gem,并且我有rb-readline(0.4.2)(人们推荐的最少
我在我的Rails项目中使用Pow和powifygem。现在我尝试升级我的ruby版本(从1.9.3到2.0.0,我使用RVM)当我切换ruby版本、安装所有gem依赖项时,我通过运行railss并访问localhost:3000确保该应用程序正常运行以前,我通过使用pow访问http://my_app.dev来浏览我的应用程序。升级后,由于错误Bundler::RubyVersionMismatch:YourRubyversionis1.9.3,butyourGemfilespecified2.0.0,此url不起作用我尝试过的:重新创建pow应用程序重启pow服务器更新战俘
我正在尝试修改当前依赖于定义为activeresource的gem:s.add_dependency"activeresource","~>3.0"为了让gem与Rails4一起工作,我需要扩展依赖关系以与activeresource的版本3或4一起工作。我不想简单地添加以下内容,因为它可能会在以后引起问题:s.add_dependency"activeresource",">=3.0"有没有办法指定可接受版本的列表?~>3.0还是~>4.0? 最佳答案 根据thedocumentation,如果你想要3到4之间的所有版本,你可以这
我遵循MichaelHartl的“RubyonRails教程:学习Web开发”,并创建了检查用户名和电子邮件长度有效性的测试(名称最多50个字符,电子邮件最多255个字符)。test/helpers/application_helper_test.rb的内容是:require'test_helper'classApplicationHelperTest在运行bundleexecraketest时,所有测试都通过了,但我看到以下消息在最后被标记为错误:ERROR["test_full_title_helper",ApplicationHelperTest,1.820016791]test
我是rails的新手,想在form字段上应用验证。myviewsnew.html.erb.....模拟.rbclassSimulation{:in=>1..25,:message=>'Therowmustbebetween1and25'}end模拟Controller.rbclassSimulationsController我想检查模型类中row字段的整数范围,如果不在范围内则返回错误信息。我可以检查上面代码的范围,但无法返回错误消息提前致谢 最佳答案 关键是您使用的是模型表单,一种显示ActiveRecord模型实例属性的表单。c