Question

I have a DBus server which exposes a method that requires a huge time to complete (about 3 minutes). The client performs a synchronous call to this method.

The problem is, after exactly 25 secs the client throws an error because 'did not receive a reply'.

Unfortunately, I cannot change the client, so I cannot make the call asynchronous, as it should be.

I tried to use this line in my server configuration:

<limit name = "reply_timeout">240000</limit>

but the situation does not change.

Any idea?

Was it helpful?

Solution

That limit parameter configures the bus daemon, which is only one of the processes involved. The others are the client and the server, and the particular D-Bus library used on each end may have a default timeout for synchronous messages. And 25 seconds is indeed the _DBUS_DEFAULT_TIMEOUT_VALUE in libdbus, the C reference implementation.

Changing the timeout in the client, for example in dbus_connection_send_with_reply_and_block, is easier than changing the API to be asynchronous.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top