title: Cannot receive any reply in 120 seconds. This timeout is controlled by spark.rpc.askTimeout
body: <p>I am learning something about spark streaming and I have got a program which is designed to find the top 5 words.</p>
  
  <pre><code>import org.apache.spark.streaming.StreamingContext
  import org.apache.spark.SparkConf
  import org.apache.spark.streaming.Seconds
  
  object Top5{
     def main(args:Array[String]){
    val conf=new SparkConf()
    conf.setAppName("AppName")
    conf.setMaster("spark://SparkMaster:7077")
    val ssc=new StreamingContext(conf,Seconds(10))
    val hottestStream=ssc.socketTextStream("SparkMaster：7077", 9999)
    val searchPair=hottestStream.map(_.split("")(1)).map(item=&gt;(item,1))
    val hottestDStream=searchPair.reduceByKeyAndWindow((v1:Int,v2:Int)=&gt;v1+v2,Seconds(60),Seconds(20))
    hottestDStream.transform(hottestItemRDD=&gt;{
      val top5=hottestItemRDD.map(pair=&gt;(pair._2,pair._1)).sortByKey(false)
                   .map(pair=&gt;(pair._2,pair._1)).take(3) 
       for(item&lt;-top5){
         println(item)
       }
      hottestItemRDD}
    ).print()
    ssc.start()
    ssc.awaitTermination()
  }}
  </code></pre>
  
  <p>As I am performing it in the spark cluster environment, the error says</p>
  
  <pre><code>Cannot receive any reply in 120 seconds. This timeout is controlled by spark.rpc.askTimeout
  </code></pre>
  
  <p>I have searched my question in stackoverflow. And there is a similar question <a href="https://stackoverflow.com/questions/43346855/org-apache-spark-rpc-rpctimeoutexception-futures-timed-out-after-120-seconds">org.apache.spark.rpc.RpcTimeoutException: Futures timed out after [120 seconds]. This timeout is controlled by spark.rpc.lookupTimeout</a> The answer tells me  to increase <code>spark.timeout.network</code>, is that right? Besides, where can I find <code>spark.timeout.network</code>?</p>