2013-05-30 71 views
0

我們正在運行一個包含大量數據的3節點replSet,目前有超過1500個數據文件。使用> 1023 FD啓動MongoDB時出現的問題

當重新啓動MongoDB實例,我們現在碰到以下問題:

Thu May 30 12:11:20.326 [initandlisten] create collection local.startup_log { create: "startup_log", size: 10485760, capped: true } 
Thu May 30 12:11:20.326 [initandlisten] command local.$cmd command: { create: "startup_log", size: 10485760, capped: true } ntoreturn:1 keyUpdates:0 reslen:75 543ms 
Thu May 30 12:11:20.326 [initandlisten] info PageFaultRetryableSection will not yield, already locked upon reaching 
Thu May 30 12:11:20.326 [initandlisten] insert local.startup_log ninserted:1 keyUpdates:0 0ms 
Thu May 30 12:11:20.326 [initandlisten] fd limit hard:550000 soft:550000 max conn: 440000 
Thu May 30 12:11:20.326 [initandlisten] ERROR: socket 1203 is higher than 1023; not supported 
Thu May 30 12:11:20.326 [initandlisten] now exiting 
Thu May 30 12:11:20.326 dbexit: 

經過大量的谷歌搜索的,它看起來像它有什麼用FD_SETSIZE限制做1024,但-n的ulimit設置爲550000,你可以在日誌中看到。

我沒有設法再次提升實例......有人可能對我有暗示嗎?

感謝,奧利弗

+0

你在哪個操作系統上運行服務器? –

+0

您可能還想看看[這個問題](https://jira.mongodb.org/browse/SERVER-8521),這可能取決於版本。 –

+0

它在RHEL 6.3上運行。 MongoDB版本是v2.4.3,git版本:fe1743177a5ea03e91e0052fb5e2cb2945f6d95f。 – user2436006

回答

0
此錯誤信息

源代碼是在這裏:

https://github.com/mongodb/mongo/blob/v2.4.1/src/mongo/util/net/listen.cpp#L205

文件描述符這裏相比FD_SETSIZE,這是在頭文件中定義爲1024。我看不容易方式如何通過配置任何東西(操作系統,ulimits ...)來改變這個值。

您是否使用最新的MongoDB版本?看看MongoDB的問題,通過在啓動時不打開所有文件來減少使用的文件描述符的數量有一些變化 - 請參閱Joachim Isaksson的評論中的鏈接。

+0

謝謝大家,在啓動時不打開所有文件聽起來不錯。但我很確定這是否已經實現了碰撞2.4.3。 – user2436006