When timeout hit You with Amazon SQS on FreeBSD/VMWare

I become fan of Amazon’s SQS and ActiveMessaging plugin recently. Great technology, make separating user interface and time consuming operations super easy. I will write about my experiences more, but now simple tip if You are running development environment on FreeBSD inside VMWare.

Often when doing publish to some queue I got timeout, which results in exception raised and following entry in Rails log:

Timed out trying to send the message 
#<OpenStruct body="YOUR_MESSAGE", 
headers={:persistent=>true}> 
to destination YOUR_QUEUE_NAME via broker default

It is very annoying and it is related to problems with time on FreeBSD/VMWare. Despite of disabled APIC (hint.apic.0.disabled=1 in /boot/loader.conf) time is very unstable. So as for quick workaround whenever I work I do run in background following shell script:

while ( true ) do ntpdate IP_OF_LOCAL_TIME_SERVER; sleep 2; done

If someone knows how to fix this issue with time on FreeBSD and VMWare please let some hint in comments.

I have changed VMWare Player to VMWare server, which offers much more options, and from my non benchmarked observations it seems it has now more stable time. If You can call stable situation that during 2 sec loop in earlier example time differs from real one about 1 sec ;)