I have the same problem and it only happens on production machine. I think the problem is multi-threading. I guess you might have something like Parallel.ForEach in your code.
Take a look at their official document: Settings.MaxNumberThreads.
"In order to maximize execution speed of numerical algorithms, the value of MaxNumberThreads should be equal to the number of real processor cores on the system. For processors utilizing Hyper-threading the number on virtual cores may be higher. However, since those virtual cores share certain ressources for execution, parallel utiliziation can not efficently be done with them. In this cases, the number of 'cores' appearing e.g. in the windows task manager is misleading and the true number of independent cores should be used for MaxNumberThreads instead. Consult your proccessor vendor in order to find out, how many independant cores your system utilizes.
Since the number of independent cores is not reliably determined by .NET, ILNumerics defaults to 2 cores on all multicore machines. Therefore, this setting should be set manually for better processor utilization on multicore machines.
If your algorithm uses custom parallel execution models, it may be necessary to set this value to '1'. ILNumerics will run single threaded than - leaving you the option to configure the execution on parallel threads on your own.
The setting of this value also effects the corresponding value of any unmanaged optimized support library (e.g. MKL) internally used by ILNumerics.
[ILNumerics Core Module]"
You may try to set the above option to 1.