Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-2377

(EOFError) "end of file reached"

    • Type: Icon: Task Task
    • Resolution: Done
    • 3.0.7
    • Affects Version/s: None
    • Component/s: None
    • Labels:

      using passenger
      ruby version 1.9.3p194

      Gems

      rails (3.2.8)
      mongo (1.6.4)
      moped (1.2.1)
      mongoid (3.0.6)
      

      Sometimes getting this exception:

      A EOFError occurred:
      
        end of file reached
        moped (1.2.1) lib/moped/bson/extensions/hash.rb:12:in `readbyte'
      
      
        moped (1.2.1) lib/moped/bson/extensions/hash.rb:12:in `readbyte'
        moped (1.2.1) lib/moped/bson/extensions/hash.rb:12:in `__bson_load__'
        moped (1.2.1) lib/moped/bson/document.rb:7:in `deserialize'
        moped (1.2.1) lib/moped/connection.rb:106:in `block (2 levels) in read'
        moped (1.2.1) lib/moped/connection.rb:105:in `times'
        moped (1.2.1) lib/moped/connection.rb:105:in `each'
        moped (1.2.1) lib/moped/connection.rb:105:in `map'
        moped (1.2.1) lib/moped/connection.rb:105:in `block in read'
        moped (1.2.1) lib/moped/connection.rb:169:in `with_connection'
        moped (1.2.1) lib/moped/connection.rb:86:in `read'
        moped (1.2.1) lib/moped/protocol/query.rb:140:in `receive_replies'
        moped (1.2.1) lib/moped/connection.rb:125:in `block in receive_replies'
        moped (1.2.1) lib/moped/connection.rb:124:in `map'
        moped (1.2.1) lib/moped/connection.rb:124:in `receive_replies'
        moped (1.2.1) lib/moped/node.rb:518:in `block (2 levels) in flush'
        moped (1.2.1) lib/moped/node.rb:123:in `ensure_connected'
        moped (1.2.1) lib/moped/node.rb:516:in `block in flush'
        moped (1.2.1) lib/moped/node.rb:531:in `logging'
        moped (1.2.1) lib/moped/node.rb:515:in `flush'
        moped (1.2.1) lib/moped/node.rb:504:in `process'
        moped (1.2.1) lib/moped/node.rb:70:in `command'
        moped (1.2.1) lib/moped/session/context.rb:51:in `block in command'
        moped (1.2.1) lib/moped/session/context.rb:109:in `block in with_node'
        moped (1.2.1) lib/moped/cluster.rb:150:in `block in with_primary'
        moped (1.2.1) lib/moped/node.rb:168:in `ensure_primary'
        moped (1.2.1) lib/moped/cluster.rb:149:in `with_primary'
        moped (1.2.1) lib/moped/session/context.rb:108:in `with_node'
        moped (1.2.1) lib/moped/session/context.rb:50:in `command'
        moped (1.2.1) lib/moped/database.rb:76:in `command'
        moped (1.2.1) lib/moped/query.rb:36:in `count'
        mongoid (3.0.5) lib/mongoid/contextual/mongo.rb:69:in `count'
        mongoid (3.0.5) lib/mongoid/contextual.rb:18:in `count'
        mongoid (3.0.5) lib/mongoid/finders.rb:22:in `count'
        app/models/aaa.rb:8:in `pick'
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            zakwanhaj zakwanhaj
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: