2016-03-08 57 views
0

我應該解釋一點歷史。有一段時間我作爲發出HTTP:嘗試列出數據中心中VSI的SSL讀取超時

https://api.softlayer.com/rest/v3/SoftLayer_Account/getVirtualGuests.json? objectMask=mask[datacenter.name,status,globalIdentifier,primaryBackendIpAddress,primaryIpAddress,billingItem.categoryCode,billingItem.description,billingItem.createDate,billingItem.orderItem.order.userRecord.username,billingItem.orderItem.order.userRecord.email,users.username,users.email,users.userStatus,operatingSystemReferenceCode,softwareComponents.passwords,operatingSystem,hourlyBillingFlag,localDiskFlag,managedResourceFlag,privateNetworkOnlyFlag,powerState,blockDeviceTemplateGroup.name,blockDeviceTemplateGroup.id;blockDevices.diskImage,networkVlans,activeTransactionCount,activeTransactions,consoleIpAddressRecord.type,consoleIpAddressRecord.port,consoleIpAddressRecord.ipAddress.ipAddress] 

這檢索到的所有VSI的所有數據中心,我開始每次都得到同樣的錯誤,所以我現在通過每個SoftLayer的數據中心環獲得VSI的。我使用下面的EST API:

https://api.softlayer.com/rest/v3/SoftLayer_Account/getVirtualGuests.json?objectMask=mask[datacenter.name,status,globalIdentifier,primaryBackendIpAddress,primaryIpAddress,billingItem.categoryCode,billingItem.description,billingItem.createDate,billingItem.orderItem.order.userRecord.username,billingItem.orderItem.order.userRecord.email,users.username,users.email,users.userStatus,operatingSystemReferenceCode,softwareComponents.passwords,operatingSystem,hourlyBillingFlag,localDiskFlag,managedResourceFlag,privateNetworkOnlyFlag,powerState,blockDeviceTemplateGroup.name,blockDeviceTemplateGroup.id;blockDevices.diskImage,networkVlans,activeTransactionCount,activeTransactions,consoleIpAddressRecord.type,consoleIpAddressRecord.port,consoleIpAddressRecord.ipAddress.ipAddress]&objectFilter={"virtualGuests":{"datacenter":{"name":{"operation":"_=sjc01"}}}} 

一切工作正常,除了我得到:在SJC01和TOR01的SoftLayer數據中心發生

'_content' => '500 SSL read timeout: 
', 
'_rc' => 500, 
'_headers' => bless({ 
'client-warning' => 'Internal response', 
'client-date' => 'Mon, 07 Mar 2016 16:23:33 GMT', 
'content-type' => 'text/plain' 
}, 'HTTP::Headers'), 
'_msg' => 'SSL read timeout: ', 

此錯誤。爲什麼會發生這種超時。

注意此循環中其他數據中心的工作,但在SJC01和TOR01上失敗。

回答

0

的問題是你的objectMask,你是從SOFTLAYER數據庫中獲取大量的數據,並導致了失敗,你可以嘗試使用限制看到,這裏http://sldn.softlayer.com/article/Rest

的信息,如果不工作,你會需要打破你的對象掩碼在部分例如你使用一個請求來獲取一些屬性,這些屬性使用具有幾個屬性的對象掩碼,然後是另一個請求來獲取其他屬性,等等,直到你擁有所有你想要的屬性。

Regards

+0

謝謝。我正在查看resultLimit。 –

+0

如果我一起指定resultLimit和objeckMask,則objectMask將被忽略。舉個例子。 https://api.softlayer.com/rest/v3/SoftLayer_Account/getVirtualGuests?resultLimit=300,100?objectMask=mask[datacenter,status,還有更多的objectMask值,並不是所有的都返回,因爲它們之前我添加了resultLimit –

+0

混合您需要使用&的結果限制和對象掩碼?例如SoftLayer_Account/getVirtualGuests?resultLimit = 10,20&objectMask = mask [id,datacenter] –

相關問題