Where can XML-RPC time gap delay value be increased ?

Where can XML-RPC time gap delay value be increased ?

by Valery Fremaux -
Number of replies: 5

Hi all,

hanging around a Time gap error that I initially attributed to a lack of clock sync between hosts (that was effective, indeed, but not sufficiant). I need to adjust this delay to an higher value...

if someone knows...

thanks.

Average of ratings: -
In reply to Valery Fremaux

Re: Where can XML-RPC time gap delay value be increased ?

by Nigel McNie -
Could you explain exactly why you need the clock gap to be larger? The time on two hosts doing networking should be as closely matched as possible, as they use SSL certificates with expiry dates that should be checked accurately.

You can use a service like ntp to keep the time on separate servers in sync.
In reply to Nigel McNie

Re: Where can XML-RPC time gap delay value be increased ?

by Valery Fremaux -

We actually setup ntp service so all our host share the same clock.

We will survey the behaviour to check if it is enough. Our experience showed that effectively plesiochronous clock setting in a networked system was not stable enough to guarantee avoidance of divergence.

As our XML-RPC goes through a load balancer, and could be routed to hosts with an unkown immediate load, there is a risk that a XML-RPC query would consume more than 15 secs. to be handled at the receiver location. In this case we break the service.

As in our situation, we use a 40 mnetworked Moodle array within a coherent nationwide system, so there are "intimous" XML-RPC exchanges between platforms to federate contents. So we need XML-RPC calls to be performed, including with some delay. The resolution of the call is more important than the delay it takes, as long as it can logically be concluded.

Cheers.  

In reply to Valery Fremaux

Re: Where can XML-RPC time gap delay value be increased ?

by Nigel McNie -
We've never had any problems with ntp personally... it seems to keep several servers accurate to with in 1/100th of a second.

But your point about calls taking longer than 15 seconds is well taken. While I'd hope that wouldn't be the case for SSO calls (because you'd cause an intolerable delay for users), I can see how background jobs could cause issues.

Looking in the code, it seems you can set the MNET configuration parameter "drift_threshold" to change the 15 second limit to something longer. I'm not sure that option is exposed in the UI, but you could have a look around for it, or just set it in the database. The relevant file is mnet/xmlrpc/client.php - search for "hysteresis"
In reply to Nigel McNie

Re: Where can XML-RPC time gap delay value be increased ?

by Valery Fremaux -

Thanks Nigel. I agree with you that 15 seconds gap for an XML-RPC chain processed on the same servers (literally localhost, including using local network LB gateway seems being so long !!).

I asked my system adminsitrator to rip out Xorg Xwindows task and to lower the running level not to be bothered by those unuseful things... I guess it will help hosts to raise power. We are just on an evaluation system running with low range equipment VMWares so we may anticipate high load effects on future production servers.

Cheers.

In reply to Valery Fremaux

Re: Where can XML-RPC time gap delay value be increased ?

by Michael | -
Had the same issue with the time gap, this was with multiple moodles on the same server, so no problem with time.

I added it in the mnet/xmlrpc/client.php with "set_config('drift_threshold', 60, 'mnet');" where it checks the time offset, there may be a better place.


M=