-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Issue] After a few ours running, Dbus throws the org.freedesktop.DBus.Error.LimitsExceeded exception #57
Comments
Did a search and found there are a few things that may resolve your issue. The nature of the error your running into with DBus is that the connections to the scanned devices are never closed. You could attempt to increase the DBus connection limit of active connections on your distribution. Or, attempt to close the connection after obtaining the information of the scanned device in The increasing the DBus connection limit can be found in numerous posts. This was obtained searching on , "Dbus throws the org.freedesktop.DBus.Error.LimitsExceeded".
For the closing of connections, possibly attempt the following inside of your |
Thank you Damian for your response.
To confirm, should I call DisconnectAsync after requesting properties? Please note that I am neither pairing with nor connecting to the device.
To clarify the question, In your Scan sample code<https://github.com/SuessLabs/Linux.Bluetooth/blob/develop/samples/scan/Program.cs>, is the following change acceptable?
I tried but nothing happens, I need to wait a few hours to see if it solved the issue, but intuitively, DisconnectAsync should be the call to break the Bluetooth connection.
private static async Task<string> GetDeviceDescriptionAsync(IDevice1 device)
{
var deviceProperties = await device.GetAllAsync();
//release the DBus connection
await device.DisconnectAsync();
return $"{deviceProperties.Alias} (Address: {deviceProperties.Address}, RSSI: {deviceProperties.RSSI})";
}
…________________________________
From: Damian ***@***.***>
Sent: Friday, January 3, 2025 9:39 AM
To: SuessLabs/Linux.Bluetooth ***@***.***>
Cc: Uriel Kluk ***@***.***>; Author ***@***.***>
Subject: Re: [SuessLabs/Linux.Bluetooth] [Issue] After a few ours running, Dbus throws the org.freedesktop.DBus.Error.LimitsExceeded exception (Issue #57)
Did a search and found there are a few things that may resolve your issue. The nature of the error your running into with DBus is that the connections to the scanned devices are never closed.
You could attempt to increase the DBus connection limit of active connections on your distribution. Or, attempt to close the connection after obtaining the information of the scanned device in WatchDevicesAddedAsync(...).
The increasing the DBus connection limit can be found in numerous posts. This was obtained searching on , "Dbus throws the org.freedesktop.DBus.Error.LimitsExceeded".
* https://bugs.mageia.org/show_bug.cgi?id=8393
* https://dbus.freedesktop.org/doc/dbus-daemon.1.html
* https://www.suse.com/support/kb/doc/?id=000020405
For the closing of connections, possibly attempt the following inside of your WatchDevicesAddedAsync(...). Perform an await dev.DisconnectAsync() after obtaining the desired information from your scanned device. These are the connections which are not being closed.
—
Reply to this email directly, view it on GitHub<#57 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AJ2NCA2XQSN6YAZ6AQYGTXT2I2VKXAVCNFSM6AAAAABUQ74VTCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNRZGQZTAMJQG4>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Description
The application is designed for a headless device that scans BLE advertisements and pushes them to the cloud via MQTT (message pump). However, after running for a few hours, it crashes with the following exception:
Unhandled exception. Tmds.DBus.DBusException: org.freedesktop.DBus.Error.LimitsExceeded: Connection ":1.290" is not allowed to add more match rules (increase limits in configuration file if required; max_match_rules_per_connection=2048)
at Tmds.DBus.DBusConnection.CallMethodAsync(Message msg, Boolean checkConnected, Boolean checkReplyType)
at Tmds.DBus.DBusConnection.WatchSignalAsync(ObjectPath path, String interface, String signalName, SignalHandler handler)
at Tmds.DBus.Connection.WatchSignalAsync(ObjectPath path, String interface, String signalName, SignalHandler handler)
at Tmds.DBus.CodeGen.DBusObjectProxy.WatchNonVoidSignalAsync[T](String iface, String member, Action'1 error, Action'1 action, ReadMethodDelegate'1 readValue, Boolean isPropertiesChanged)
at Linux.Bluetooth.Device.CreateAsync(IDevice1 proxy)
at Linux.Bluetooth.Adapter.OnDeviceAddedAsync(ValueTuple'2 args)
at System.Threading.Tasks.Task.<>c.b__128_1(Object state)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
...
Here is the Initialization Code:
Here is the adapter_OnPowerOnCompletedAsync event function
And here is the Adapter_DeviceFound event function
Environment
Severity (1-5)
4=Error: Need to reset the adapter
Steps To Reproduce
keep the adapter scanning for a few hours.
Expected Behavior
No crash
The text was updated successfully, but these errors were encountered: