[patch] increase default rules per connection limit
David Zeuthen
david at fubar.dk
Wed Apr 13 20:32:16 PDT 2005
(Adding dbus list to Cc)
On Wed, 2005-04-13 at 13:32 +0200, Martin Pitt wrote:
> Hi!
>
> Some users had problems with the default rule limit (see [1]):
>
> $ hal-device-manager
> Traceback (most recent call last):
> File "/usr/bin/hal-device-manager", line 18, in ?
> DeviceManager()
> File "/usr/share/hal/device-manager/DeviceManager.py", line 88, in __init__
> self.add_device_signal_recv (name);
> File "/usr/share/hal/device-manager/DeviceManager.py", line 99, in
> add_device_signal_recv
> udi)
> File "/usr/lib/python2.4/site-packages/dbus.py", line 93, in add_signal_receiver
> dbus_bindings.bus_add_match(self._connection, match_rule)
> File "dbus_bindings.pyx", line 1516, in dbus_bindings.bus_add_match
> dbus_bindings.DBusException: Connection ":1.17" is not allowed to add more match
> rules (increase limits in configuration file if required)
>
> It helped to increase this limit to an ample value:
>
> diff -ruN hal-0.5.0-old/hal.conf.in hal-0.5.0/hal.conf.in
> --- hal-0.5.0-old/hal.conf.in 2004-09-12 11:57:59.000000000 +0200
> +++ hal-0.5.0/hal.conf.in 2005-04-13 12:11:37.024496368 +0200
> @@ -25,5 +25,7 @@
> receive_sender="org.freedesktop.Hal"/>
> </policy>
>
> + <limit name="max_match_rules_per_connection">512</limit>
> +
> </busconfig>
>
>
> Since this certainly affects other people, too, do you consider
> adopting this into the upstream version?
Since this affects all services on the system message bus, this needs to
be in D-BUS; I don't think this can be tuned per service. Havoc, what do
you think about this, can I commit the attached patch that bumps the
default number of rules from 128 to 512?
(As an aside, the horrendous design of h-d-m, adding two rules per hal
device object, is due to the fact that the python bindings presently
don't let one match on a subtree of objects. I know John Palmieri and
Ray Strode is revamping those bindings though.)
Cheers,
David
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dbus-bump-rules-per-connection.patch
Type: text/x-patch
Size: 1550 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20050413/6a396825/dbus-bump-rules-per-connection.bin
More information about the dbus
mailing list