[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [xmlblaster-devel] Why do xml-rpc sessions w/ callbacks time out?

Brad Clements wrote:
I'm using a modified pyBlaster to execute a long-running process with callbacks.

I've added code to the callback component of pyblaster to notice if it has not received a ping in 5 minutes to then attempt to login again.

But, from examining the xmlBlaster logging output, it seems to deactive the client-side of the xml-rpc session after inactivity, even though the callback associated with that client *was* answering ping requests.

Perhaps I'm reading the log output incorrectly.

Can anyone confirm this?

If an xml-rpc client has a callback URL associated with it, and if that callback continues to answer ping requests, should the client handle timeout due to inactivity? I think it should not.

You are right, the pings don't prevent from session timeout during client inactivity.

On connect() or login() you need to set your session timeout:

    <session timeout='0'/>
    <callback type='XMLRPC'>http://localhost:8081</callback>

0 milliseconds sets the session to last forever, for details see


I have added an example to pyBlaster.py in the current cvs.

How do I change the idle timeout for xml-rpc clients? Can it be done on the client handle, or do I need to change a configuration file entry somewhere?


It seems that my auto-relogin code isn't quite working, I suspect that when an xml-rpc client logs in with a callback URL, that callback URL is tested during the login process, before login returns. Is that true?

Yes, this is correct, in CbDispatchConnection.java:97 we do a ping("") to check availability.

If that's the case, I'll have to spawn the relogin process into a new thread, because I'm calling login from the thread that handles the callback, so it can't answer right away. It seems to hang.

If this code is generic we are happy to integrate it into the xmlBlaster distribution.

best regards,


-- http://www.xmlBlaster.org