Query cancellation & timeout

could be a realtime task :)