Hystrix : 解決請求會被拒絕和拋出異常並且fallback不會被調用的問題


啟動腳本增加參數:-Dserver.tomcat.max-http-header-size=102400

增大Hystrix,ribbon的各項參數;

 
        
hystrix:
  threadpool:
    default:
      coreSize: 5000 #並發執行的最大線程數 50
      maxQueueSize: 5000 #BlockingQueue的最大隊列數 ---
      queueSizeRejectionThreshold: 3000 #即使maxQueueSize沒有達到,達到queueSizeRejectionThreshold該值后,請求也會被拒絕 ---
  command:
    default:
      execution.isolation.thread.timeoutInMilliseconds: 7200000  #命令執行超時時間 2hours 600000 10min #600000 1min
      fallback.isolation.semaphore.maxConcurrentRequests:  5000 #如果並發數達到該設置值,請求會被拒絕和拋出異常並且fallback不會被調用。50
      execution.isolation.semaphore.maxConcurrentRequests: 5000 #最大並發請求數50
      default.execution.timeout.enabled: false     #執行是否啟用超時

ribbon:
  eureka.enabled: false
  ConnectTimeout: 6000000 #600000
  ReadTimeout: 6000000 #600000
 
        

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM