Set Azure Webjob to run in 64-bit Mode

I just found out that my Azure Webjob was running 32-bit all the time without me even knowing it. As I tried to attach my debugger on the Webjob I got following error message:
"Unable to attach. The 64-bit version of the Visual Studio Remote Debugger (MSVSMON.EXE) cannot be used to debug 32-bit processes or 32-bit dumps. Please use the 32-bit version instead."

That was a surprise because I was expecting my WebJobs to be running 64-bit, especially as I double checked under my Application Settings in Azure Portal that my Web App IS running in 64-bit Mode. But no. WebJob Executables were acutely built as 32-bit Applications so I looked at my Build Configuration Settings and I found following Checkbox:

I am not sure why this setting is a default for every Azure WebJob. It only might have sense if Azure Team thinks that WebJobs are planned for a small workloads but if you have (as in my case) very large workloads you will see that x64 servers with sufficient CPU and RAM outperform x86 by a healthy measure.

So anyway, if you have huge workloads and process gigabytes of data with your WebJobs, make sure you unselect this Checkbox in your Build Configuration!


Posted Oct 18 2016, 04:47 PM by Armin Kalajdzija
Filed under: ,

Comments

Steve Cadwallader wrote re: Set Azure Webjob to run in 64-bit Mode
on 12-12-2016 18:48

Also, be sure to set this setting for both Debug and Release modes!

sander wrote re: Set Azure Webjob to run in 64-bit Mode
on 01-24-2017 12:17

Edge case:

- when using DocumentDb partitioning, 64bit is not supported in the documentdb client

developers.de is a .Net Community Blog powered by daenet GmbH.