PGM發送表單大小

來源:互聯網
上載者:User

使用PGM發送資料的時候, 程式報告了一下如下的錯誤。
An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full 224.0.0.26:11600

   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
   at PgmSocketNet.PgmSender.Connect() in E:\Code\功能代碼-伺服器端\PGM_Test\PgmSocket\PgmSender.cs:line 24
   at PGMSender.Program.testPGMSender(Object state) in E:\Code\功能代碼-伺服器端\PGM_Test\PGMSender\PGMSender\Program.cs:line 42
A:

問題找到了,我使用的組件預設每個PGMsocket 配置的發送緩衝是接近10M,這樣128個串連大致的1G的記憶體消耗, 而socket的緩衝可能也就是1G大小(Socket的最大緩衝多大需要證實,現在還不清楚),這樣也就能支援100來個串連.解決方案:將每個串連的緩衝縮小到64k一下,理論上的串連數最大值提高了200被,能到20000個,普通程式是個夠用了。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.