atom feed16 messages in org.freedesktop.lists.avahi[avahi] limit on dbus client objects
FromSent OnAttachments
Brian GerkeyOct 4, 2007 10:13 am 
Ludovic CourtèsOct 5, 2007 2:25 am 
Lennart PoetteringOct 11, 2007 5:02 pm 
Lennart PoetteringOct 11, 2007 5:13 pm 
je...@inveneo.orgOct 11, 2007 5:21 pm 
je...@inveneo.orgOct 11, 2007 5:27 pm 
je...@inveneo.orgOct 11, 2007 5:27 pm 
je...@inveneo.orgOct 11, 2007 5:28 pm 
je...@inveneo.orgOct 11, 2007 5:28 pm 
je...@inveneo.orgOct 11, 2007 5:28 pm 
je...@inveneo.orgOct 11, 2007 5:28 pm 
je...@inveneo.orgOct 11, 2007 5:28 pm 
je...@inveneo.orgOct 11, 2007 5:28 pm 
je...@inveneo.orgOct 11, 2007 5:28 pm 
Brian GerkeyOct 12, 2007 9:58 am 
Lennart PoetteringOct 12, 2007 3:42 pm 
Subject:[avahi] limit on dbus client objects
From:Brian Gerkey (bri@gerkey.org)
Date:Oct 4, 2007 10:13:44 am
List:org.freedesktop.lists.avahi

I'm developing an application that can in some cases register a large number of services, in the 10s or even 100s. Because I want this application to run on Linux, OS X, and Windows, I'm using the Bonjour API. On Linux, I use Avahi via its Bonjour compatibility layer, and on OS X and Windows I use mDNSResponder directly.

Using the Avahi-Bonjour layer on Linux, I quickly get errors during service registration that I eventually tracked down to the "max_connections_per_user" limit in /etc/dbus-1/system.d/avahi- dbus.conf (this is an Ubuntu Dapper box). This limit defaults to 20, and it seems that every time I initialize a new DNSServiceRef (e.g., by registering a service), it uses one of these connections. Clearly I can raise this limit, but that's not a great solution because all of my users would have to do the same.

I don't have this problem running the exact same code under OS X with mDNSResponder.

Three questions:

- Is there a way to avoid this problem while still using the Bonjour API? E.g., can I get the Avahi-Bonjour layer to reuse its dbus client connection somehow?

- If I move to the native Avahi API, will I have a similar problem with a single process that registers many services?

- Independent of the Zeroconf implementation that's being used, are there drawbacks in general to registering and browsing large numbers of services?

thanks, brian.