none
Biztalk orchestration as wcf service time out issue RRS feed

  • Question

  • Hi,

    I have exposed biztalk orchestration as wcf service.

    when my client calls this service he got time out., and i checked the same  even i didn't get request  also.

    then i move to iis and browse the service it takes more time to browse first time , next time onward it is very Quick.

    how can i handle this.

    Thursday, December 22, 2016 5:55 AM

Answers

  • Hi Dinesh,

    WCF isolated host instance runs in an IIS Worker process (w3wp.exe). The isolated host process does not really unload from memory, it completely terminates. This is default behaviour for IIS worker processes and is controlled by the Recycle properties on the application pool. You might like to turn this off.

    If you are using IIS 7.5 you might like to look at the AutoStart. StartMode , Regular Time Interval set to 0 and the ManagedRuntimeLoader properties of the application pool. These properties allow you to automatically start an IIS worker process and preload assemblies, rather than waiting for the first request. This can seriously speed up the first call.

    On WCF Custom receive port, change the value of time out (close, open, send, receive) to increase timeout.

    Refer: https://msdn.microsoft.com/en-us/library/bb246064.aspx?f=255&MSPPError=-2147217396

    You have to add below config options to web.config file.

    <system.web>
        <httpRuntime executionTimeout="43200" />
    </system.web>

    Also you have to add below configs to client app.config file.

    <system.serviceModel>
        <bindings>
            <basicHttpBinding>
                <binding name="IBRAHIM_SAP_Fatura_T_FaturaOrch_InvoiceReceivePortSoap" maxReceivedMessageSize="2147483647"  receiveTimeout="03:00:00"
        sendTimeout="02:00:00" transferMode="Streamed"/>
            </basicHttpBinding>
        </bindings>
    </system.serviceModel>



    Rachit Sikroria (Microsoft Azure MVP)

    Thursday, December 22, 2016 6:54 AM
    Moderator
  • Hi Dinesh,

    The first thing is to check if the server where the service is connected is connectable from the remote server, if it is then I would suggest that you observe the behavior again when the client is not able to browse the service, that time check if the remote server is able to connect to the server where the service is hosted, this seems to be a weird issue , ideally browsing the service manually should not be an issue. Also check once if you app pool is recycling again and again

    Regards


    Mandar Dharmadhikari

    Thursday, December 22, 2016 6:56 AM
    Moderator

All replies

  • Hi DineshNad,

    then i move to iis and browse the service it takes more time to browse first time , next time onward it is very quick

    >>The general behavior of the app pool is that after a restart the first time invocation of the service takes ome time(as it has to load the service  dlls into the memory), later on the invocation is fast, what you observe is a correct behavior

    Refer,

    Why after each restart, my local .NET sites take time to load for the first time

    Regards


    Mandar Dharmadhikari



    Thursday, December 22, 2016 6:02 AM
    Moderator
  • Yes i know  Mandar,

    But my case is After first request time out,later requests also same timeout behaviour un till i manually go to iis i browse service manually.

    I think  this issue is because of server started/restarted.


    • Edited by DineshNad Thursday, December 22, 2016 6:31 AM
    Thursday, December 22, 2016 6:31 AM
  • Hi Dinesh,

    So are you still observing the same issue in this?? is it intermittent? Any warnings/errors in the event log?? IS the service browse able from the remote machine?

    Regards


    Mandar Dharmadhikari

    Thursday, December 22, 2016 6:37 AM
    Moderator
  • Hi Mandar,

    No, service is not browse able from the remote machine, untill the manual activity.

    i have exposed this service  a week back , and yesterday my server was restarted.

     i have noticed this behavior first time, i will check in future for the same.

    Thursday, December 22, 2016 6:52 AM
  • Hi Dinesh,

    WCF isolated host instance runs in an IIS Worker process (w3wp.exe). The isolated host process does not really unload from memory, it completely terminates. This is default behaviour for IIS worker processes and is controlled by the Recycle properties on the application pool. You might like to turn this off.

    If you are using IIS 7.5 you might like to look at the AutoStart. StartMode , Regular Time Interval set to 0 and the ManagedRuntimeLoader properties of the application pool. These properties allow you to automatically start an IIS worker process and preload assemblies, rather than waiting for the first request. This can seriously speed up the first call.

    On WCF Custom receive port, change the value of time out (close, open, send, receive) to increase timeout.

    Refer: https://msdn.microsoft.com/en-us/library/bb246064.aspx?f=255&MSPPError=-2147217396

    You have to add below config options to web.config file.

    <system.web>
        <httpRuntime executionTimeout="43200" />
    </system.web>

    Also you have to add below configs to client app.config file.

    <system.serviceModel>
        <bindings>
            <basicHttpBinding>
                <binding name="IBRAHIM_SAP_Fatura_T_FaturaOrch_InvoiceReceivePortSoap" maxReceivedMessageSize="2147483647"  receiveTimeout="03:00:00"
        sendTimeout="02:00:00" transferMode="Streamed"/>
            </basicHttpBinding>
        </bindings>
    </system.serviceModel>



    Rachit Sikroria (Microsoft Azure MVP)

    Thursday, December 22, 2016 6:54 AM
    Moderator
  • Hi Dinesh,

    The first thing is to check if the server where the service is connected is connectable from the remote server, if it is then I would suggest that you observe the behavior again when the client is not able to browse the service, that time check if the remote server is able to connect to the server where the service is hosted, this seems to be a weird issue , ideally browsing the service manually should not be an issue. Also check once if you app pool is recycling again and again

    Regards


    Mandar Dharmadhikari

    Thursday, December 22, 2016 6:56 AM
    Moderator