thanks for your reply, ian.

I was just being a little lazy so decided against upgrading/
downgrading memcached gem and dependencies.
I went for another solution -> I used global memcached object
everywhere in the code but made the access thread safe by using mutex.
It's working well for now, though I'm not sure if it's causing too
much performance overheads.

I'll give your suggesting a try shortly for sure, even if just for
comparing performance.

thanks to Jonathan as well for the updated information.

Amit

On Oct 15, 1:30 am, Ian Eyberg <[email protected]> wrote:
> Hi Amit,
>
>   That's a really old ticket you found! ;)
>
> Here is how we are handling it for now:
>
> you'll want to grab the correct libs that evan has here:
>
>   wgethttp://blog.evanweaver.com/files/libmemcached-0.25.14.tar.gz
>   ./configure && make && sudo make install
>
> then grab his matching gem, yes they have to match otherwise
> you end up in dependency hell
>
>   wgethttp://blog.evanweaver.com/files/memcached-0.13.gem
>   sudo gem install memcached-0.13.gem
>
> don't forget to do a ldconfig afterwards..
>
> This solved our problem but it really isn't that cool cause you
> still have to make the connection to memcached -- so it's at
> best a 'temp. fix' -- I definitely wouldn't recommend this if
> you are going across the network as latency will strike you down.
>
> -ian
>
> On 13:04 Wed 14 Oct     , Amit wrote:
>
>
>
>
>
> > Hi,
>
> > Another issue with merb caching :) When using memcached store,
> > merb::cache doesn't seem to close connections to the memcached server.
> > Even stranger, connections don't seem to be getting reused, rather a
> > new connection to memcached server gets created on every cache access.
>
> > I've an api service running as a merb application. I use a threaded
> > client that makes, say 200 simultaneous requests to the the app. For
> > each request, the merb app tries to provide the results from cache and
> > accesses database only if its a cache miss. On each client execution,
> > the number of open file descriptors (memcached socket connections)
> > goes up by 200. Eventually, after a few executions, the open file
> > descriptor limit on the server is crossed and memcached returns a
> > EMFile error ("too many open files"), or sometimes even a
> > "ATimeoutOccured" exception.
>
> > It's already logged as a ticket but there hasn't been any activity or
> > comments thereafter.
> >https://merb.lighthouseapp.com/projects/7588/tickets/219-merbcache-op...
> > There is just one comment suggesting to dispense with merb::cache and
> > use memcached gem directly. I tried even that, but unfortunately,
> > calling @cache.quit doesn't seem to be closing the connection and the
> > number of open file descriptors keep on moving northwards for me. I'm
> > on Ubuntu jaunty using Merb 1.1, memcached 1.2.5 and memcached gem
> > 0.15.3. Any help will be highly appreciated.
>
> > thanks
> > Amit
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"merb" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/merb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to