The problem is fairly evident in that the server is closing the connection because the connection is idle.
libcouchbase 2.4.4 introduced a feature which would allow it to detect dead connections before reusing them, and use of this feature requires the newer Ruby gem (1.3.11) for other internal reasons. It may be that in your case you are now getting a different error (it would be almost impossible, using this newer version, to have a dead connection “leaked” through), so if the problem still persists, I’d recommend you try with the newer versions (verify you are indeed using them) and then collect the logs again. The log output this time may very well be different. Needless to mention, the upgraded versions won’t take effect until you’ve restarted your application. If you are still getting the errors, ensure it’s from an application instance using the newer versions. See https://issues.couchbase.com/browse/CCBC-546 <https://issues.couchbase.com/browse/CCBC-546> for the issue which caused the fix in the first place (and I believe, there was a previous issue as well). This might help debug this issue a bit more. The server version doesn’t matter much here, though. For a stop-gap measure, you can add http_poolsize=0 to disable reuse of connections. This may increase the connection count a bit (and possibly overflow your connection table if you query views very heavily — which it seems you don’t). You would add this to the options string “detailed_errcodes=1&http_poolsize=0”. > On Apr 15, 2015, at 6:21 PM, atedja.nm <[email protected]> wrote: > > I upgraded the gem to 1.3.11. libcouchbase is also version 2.4.9. Couchbase > server is 3.0.1. > > Problem still exist. > What else do you think could be happening? > > > On Wednesday, April 15, 2015 at 1:18:41 PM UTC-7, M. Nunberg wrote: > It would seem that the server is closing idle connections. > > You will need the Gem version 1.3.11, as the relevant fix was introduced in > that version > (https://github.com/couchbase/couchbase-ruby-client/commits/master > <https://github.com/couchbase/couchbase-ruby-client/commits/master>). Also > ensure your C client version (libcouchbase) is at least 2.4.4 (the latest is > 2.4.9 and that of course will work too). > >> On Apr 15, 2015, at 1:11 PM, atedja.nm <ated...@ <>gmail.com >> <http://gmail.com/>> wrote: >> >> I am using Ruby 2.2 and couchbase gem 1.3.10. I got this intermittent >> error, and I am not exactly sure what's causing it. >> >> Stack trace: >> >> "project/.bundle/ruby/2.2.0/gems/couchbase-1.3.10/lib/couchbase/view.rb:492:in >> `continue'", >> "project/.bundle/ruby/2.2.0/gems/couchbase-1.3.10/lib/couchbase/view.rb:492:in >> `fetch_sync'", >> "project/.bundle/ruby/2.2.0/gems/couchbase-1.3.10/lib/couchbase/view.rb:378:in >> `fetch'", >> "project/.bundle/ruby/2.2.0/gems/couchbase-1.3.10/lib/couchbase/view.rb:205:in >> `first'", >> "project/app/common/models/client.rb:87:in `by_auth_id'" >> >> >> I enabled the LCB_LOGLEVEL=5 and detailed_errcodes=1, and it shows this on >> the log: >> >> 5793590ms [I2] {16265} [INFO] (lcbio_mgr - L:407) <localhost:8092> >> (HE=0x7fbdfc0930e0) Found ready connection in pool. Reusing socket and not >> creating new connection >> 5793590ms [I2] {16265} [DEBUG] (server - L:461) <localhost:11210> >> (SRV=0x3e17e20,IX=0) Scheduling next timeout for 2500 ms >> 5793590ms [I2] {16265} [DEBUG] (lcbio_mgr - L:223) <localhost:8092> >> (HE=0x7fbdfc0930e0) Assigning R=0x7fbddc009320 SOCKET=0x7fbdf000a5e0 >> 5793590ms [I2] {16265} [DEBUG] (ioctx - L:101) <localhost:8092> >> (CTX=0x7fbddc009620,unknown) Pairing with SOCK=0x7fbdf000a5e0 >> 5793590ms [I2] {16265} [ERROR] (http-io - L:181) <localhost:8092>Got error >> while performing I/O on HTTP stream. Err=0x2d >> 5793590ms [I2] {16265} [TRACE] (confmon - L:292) Start refresh requested >> 5793590ms [I2] {16265} [DEBUG] (ioctx - L:151) <localhost:8092> >> (CTX=0x7fbddc009620,mgmt/capi) Destroying. PND=0,ENT=0,SORC=1 >> >> >> The error seems to be more apparent when there hasn't been DB access for a >> while, then suddenly a request comes in. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Couchbase" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to couchbase+...@ <>googlegroups.com <http://googlegroups.com/>. >> For more options, visit https://groups.google.com/d/optout >> <https://groups.google.com/d/optout>. > > > -- > You received this message because you are subscribed to the Google Groups > "Couchbase" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- You received this message because you are subscribed to the Google Groups "Couchbase" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
