Queue get timeout parameter question

Godzilla godzillaismad at gmail.com
Tue Apr 10 04:06:50 EDT 2007


On Apr 10, 5:38 pm, Thomas Krüger <see_signat... at nospam.nowire.org>
wrote:
> Godzilla schrieb:
>
>
>
>
>
> > I have been using the queue module for a multithreaded environment and
> > things seem to work well... until we had a requirement for the
> > application to be able to time sync to the server. With the time sync,
> > it actually disorientated the timeout in the queue's get() method...
> > e.g.
>
> > get(item, 2.0)
>
> > After the time sync, say 15 seconds backward, the thread is sitting on
> > that get() method for a total of 17 seconds. We can only sync the
> > device once per day and the time can drift up to 15 seconds per day!!
> > I had tried to get around this problem by having a sleep(2) (sleep is
> > not local system time dependant) just before the get(), but that will
> > slow down the application too much.
>
> > Anyone knows a solution to this problem or an alternative method?
>
> I was fixing a serious time drift problem on Linux lately. If your
> server runs on Linux I can give you some hints:
>
> - set the system clock
> - delete /etc/adjtime and resync system time and hardware time
>   "hwclock --systohc"
> - on some distributions you may have to reboot
> - give it some time to see if it is still drifting
> - if only the system clocks drifts (see output of "hwclock; date")
>   you may have a timer related kernel problem. This may help:
>   * deactivate ACPI via kernel boot parameter
>   * change timer frequency
>   * try different setting for all timer related stuff like
>     CONFIG_HPET_TIMER or CONFIG_X86_PM_TIMER
>
> Thomas
>
> --
> sinature:http://nospam.nowire.org/signature_usenet.png- Hide quoted text -
>
> - Show quoted text -

Thanks Thomas,

I'm not running Linux but I will take some of your pointers as a
guide.

Cheers mate.




More information about the Python-list mailing list