mod python, python and hal

John (J5) Palmieri johnp at redhat.com
Fri Oct 14 20:26:34 PDT 2005


So yes.  My understanding of how mod_python works is it keeps everything
in memory which causes the execution to be faster.  It also screws with
D-Bus because the bus rules are kept on the bus itself which is out of
process and has no idea when your script goes away because apache never
gives up the unique bus name.  What version of dbus are you using?  You
can try to remove the signal receiver but to be honest I don't know how
well this works.  This is an area that needs a little love in the
bindings.  Also you should most likely move to using private connections
though they are not bound yet.  It would be great to get feedback from
you and I am wondering if you can run the CVS version of D-Bus.  I can
make those changes tomorrow.

On Fri, 2005-10-14 at 18:32 -0700, ijwilson at laspilitas.com wrote:
> Hello
> 
> My test system has:
> 
> 	hal-0.4.7-26.3
> 
> 	apache2-mod_python-3.1.3-42
> 
> 	apache2-2.0.53-9.2
> 
> I would like to display in a web application a list of drives that are currently plugged in.
> 
> But I am getting this error message: 
> 
> DBusException: Connection ":1.14" is not allowed to add more match rules (increase limits in configuration file if required)
> 
>  
> 
> I add a signal receiver on the bus with this code:
> 
> self.bus.add_signal_receiver(self.handleDeviceAddedSignal,
>                                  'DeviceAdded',
>                                  'org.freedesktop.Hal.Manager',
>                                  'org.freedesktop.Hal',
>                                  '/org/freedesktop/Hal/Manager')
> 
> When I am done should I remove this signal reciever manually before my
> program is done executing?
> 
> Since I am using mod_python will the things I change on the hal bus
> stay across page requests.. ie.  maybe I am getting the exception
> because I keep trying to add the same signal reciever over and over.
> 
> This probably doesn't make a lot of sense because I kind of don't know
> what I am doing but any help is greatly appreciated.  Or maybe some
> more examples besides the ones that come in the hal package.
> 
> 
> Thanks.
> 
>  -Ian
> 
> 
> 
> _______________________________________________
> hal mailing list
> hal at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/hal
-- 
John (J5) Palmieri <johnp at redhat.com>



More information about the hal mailing list