Hi,<div><div><br></div><div>i think that I know where is the problem. My "messages" log says:</div></div><div><br></div><div>Jul 29 19:36:41 divinus libvirtd: 19:36:41.032: error : qemudDispatchServer:1315 : Too many active clients (100), dropping connection</div>
<div><br></div><div>It looks like that ruby-libvirt doesn't closing connection, when it's running under passenger/rails/apache. The "100" is my defined number in /etc/libvirt/libvirtd.conf</div><div><br>
</div><div>Kind regards,</div><div><br></div><div>Jaromir.</div><div>
<br><br><div class="gmail_quote">Dne 19. července 2010 20:34 Chris Lalancette <span dir="ltr"><<a href="mailto:clalance@redhat.com">clalance@redhat.com</a>></span> napsal(a):<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5">On 07/17/10 - 09:30:29PM, Jaromír Červenka wrote:<br>
> Good evening,<br>
><br>
> could anybody explain me this, please?<br>
><br>
> divinus:~ # virsh<br>
> error: cannot recv data: : Connection reset by peer<br>
> error: failed to connect to the hypervisor<br>
> divinus:~ #<br>
><br>
> I am trying to imlement Chris's ruby-libvirt to my Ruby on Rails<br>
> application. First few connection to libvirt daemon (thru ruby-libvirt API)<br>
> from my app are ok, but then somethings happend and it's not possible to<br>
> connect anymore until I restart libvirt daemon manually by init.d script or<br>
> until I restart apache (or WEBrick). And it's not possible connect to virsh<br>
> from shell also! See messages above.<br>
><br>
> When I try ruby-libvirt from bare Ruby script, everythig is fine - doesn't<br>
> matter how many times I connect. It's strange.<br>
><br>
> Does anybody have experience with ruby-libvirt in RoR application?<br>
<br>
</div></div>That is pretty strange.  One way that I could imagine this happening is if<br>
libvirtd runs out of file descriptors (or some other resource), and then<br>
can't accept any new connections.  There have been some bugs in libvirtd that<br>
cause that, though it could equally be that your objects aren't being<br>
garbage collected by the Ruby VM.  What version of libvirtd are you testing<br>
against?  If it's possible, I wonder if you can force a garbage collection<br>
run in ruby and see if that frees up any resources?<br>
<br>
--<br>
<font color="#888888">Chris Lalancette<br>
</font></blockquote></div><br></div>