|i/o timeout errors using mgo||Jamison Dance||10/2/13 10:24 AM|
I am doing a long-running (several hours long) data import into Mongo using the newest mgo release (r2013.09.04), Go 1.1 and Mongo 2.2.
I am seeing intermittent i/o timeout errors.
We create the mongo connection first, and then do 20 or so minutes of work that doesn't use the connection at all. The import will then fail on the very first write to the connection, with the following error text:
`panic: read tcp 127.0.0.1:27017: i/o timeout`
Is there something we need to set to make the connection not timeout if we create it and aren't using it for a while?
|Re: i/o timeout errors using mgo||Gustavo Niemeyer||10/2/13 10:31 AM|
Either Copy/Close a session for doing the work, or just Refresh
the session once you're done using it. This will put the underlying
socket back into the pool, and while in the pool these timeouts are
managed automatically, and your session will get a new socket if
that's necessary on the next time you use it.
If you need any extra details just let us know.
> You received this message because you are subscribed to the Google Groups
> "mgo-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mgo-users+...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
gustavo @ http://niemeyer.net
|Re: i/o timeout errors using mgo||LI Daobing||10/11/13 2:10 AM|
I tried copy session every time when I query data from mongodb, but I found that the connection count increase very quickly after I introduce this change.
And I need manage the session manually, which need a big refactor on my project.
how to disable this new "feature"?
|Re: i/o timeout errors using mgo||Robert Melton||10/11/13 2:20 AM|