Mongoid - 有很多超时

时间:2012-12-28 15:32:38

标签: ruby mongodb gem mongoid rack

我在Mongoid中有很多超时错误。该错误表明它发生在connectable.rb#16。我找到了这个https://github.com/mongoid/moped/blob/master/lib/moped/sockets/connectable.rb#L16

的来源

或此处

https://github.com/mongoid/moped/blob/master/lib/moped/sockets/connectable.rb#L45 https://github.com/mongoid/moped/blob/master/lib/moped/sockets/connectable.rb#L60

那么我该如何处理该错误,如何提高超时以消除错误?

P.S。这是一个sinatra应用程序,这里是其中一个的堆栈跟踪。

Timeout::Error at /
execution expired
file: connectable.rb location: write line: 60



/var/lib/gems/1.9.1/gems/moped-1.3.2/lib/moped/sockets/connectable.rb 60 in write
        handle_socket_errors { super }
/var/lib/gems/1.9.1/gems/moped-1.3.2/lib/moped/sockets/connectable.rb 60 in block in write
        handle_socket_errors { super }
/var/lib/gems/1.9.1/gems/moped-1.3.2/lib/moped/sockets/connectable.rb 78 in handle_socket_errors
        yield
/var/lib/gems/1.9.1/gems/moped-1.3.2/lib/moped/sockets/connectable.rb 60 in write
        handle_socket_errors { super }
/var/lib/gems/1.9.1/gems/moped-1.3.2/lib/moped/connection.rb 156 in block in write
        socket.write(buf)
/var/lib/gems/1.9.1/gems/moped-1.3.2/lib/moped/connection.rb 202 in with_connection
        yield @sock

0 个答案:

没有答案