mbraceproject / MBrace.StarterKit

A collection of demos and tutorials for MBrace
http://mbrace.io
57 stars 34 forks source link

cannot start local worker #23

Closed soloman817 closed 9 years ago

soloman817 commented 9 years ago

Hi guys,

one of my test machine cannot start local worker. I connected to that machine through RDP, and it always has exception:

2015-05-01_1243

krontogiannis commented 9 years ago

Seem like the following code used to take the total machine's memory fails in that particular machine:

                use searcher = new ManagementObjectSearcher("root\\CIMV2", "SELECT TotalPhysicalMemory FROM Win32_ComputerSystem")
                use qObj = searcher.Get() 
                            |> Seq.cast<ManagementBaseObject> 
                            |> Seq.exactlyOne
                let totalBytes = qObj.["TotalPhysicalMemory"] :?> uint64

I'll add some code to handle the search failure, but no memory counters will be available for this worker.

(Unless there is a better way to get the machine's total memory)

krontogiannis commented 9 years ago

Fixed in https://github.com/mbraceproject/MBrace.Azure/commit/a6d5613e6b9641250d4227299c00c823ea719faf