multi instance of workflow wcf in memory

I Designed two WCF long running workflow (long life) with the names 'WCF A' and 'WCF B'.

I have a loop in 'WCF A' , I'm sending a message to 'WCF B' in per execution of this loop. So it might exist some instances of 'WCF B' in memory until 'WCF B' got stop Message. Both WCF A and B are hosted in windows service. At first with executing Windows service everything is ok but after some time they will not work and as I monitored in Task manager they don't using any cpu usage.

Where is the problem from?


It all depends, monitoring cpu usage does not tell anything. It could be:

  • deadlock happened somewhere in your loop, ie maybe each instance use shared objects?
  • channel gets faulted (because time outs, exceptions etc) that execution cannot go through.
  • depends on what object of each instance of WCF B holds, it might reached OS limit, (for example: number of opened file)
  • From your question I am guess you may find debugging services are difficult, you could try following:

  • enable WCF logging , there are plenty entries on SO or google
  • attach debugger to your service, if you find this gives you random entry point, you can try put Debugger.Launch() call at OnStart overload of your service
  • log to file where your call up to
  • start your service as console application
  • hope this helps.

    链接地址: http://www.djcxy.com/p/54934.html

    上一篇: 重建后托管在CassiniDev中的WebService内存使用情况

    下一篇: 内存中的多工作流wcf实例