[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] ruby-libvirt issue



On 07/17/10 - 09:30:29PM, Jaromír Červenka wrote:
> Good evening,
> 
> could anybody explain me this, please?
> 
> divinus:~ # virsh
> error: cannot recv data: : Connection reset by peer
> error: failed to connect to the hypervisor
> divinus:~ #
> 
> I am trying to imlement Chris's ruby-libvirt to my Ruby on Rails
> application. First few connection to libvirt daemon (thru ruby-libvirt API)
> from my app are ok, but then somethings happend and it's not possible to
> connect anymore until I restart libvirt daemon manually by init.d script or
> until I restart apache (or WEBrick). And it's not possible connect to virsh
> from shell also! See messages above.
> 
> When I try ruby-libvirt from bare Ruby script, everythig is fine - doesn't
> matter how many times I connect. It's strange.
> 
> Does anybody have experience with ruby-libvirt in RoR application?

That is pretty strange.  One way that I could imagine this happening is if
libvirtd runs out of file descriptors (or some other resource), and then
can't accept any new connections.  There have been some bugs in libvirtd that
cause that, though it could equally be that your objects aren't being
garbage collected by the Ruby VM.  What version of libvirtd are you testing
against?  If it's possible, I wonder if you can force a garbage collection
run in ruby and see if that frees up any resources?

--
Chris Lalancette


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]