Long time running WCF 504 GATEWAY_TIMEOUT error
<p>I am developing a WCF web service on webHttpBinding, client application calls this WCF webservice on demand (HTTP POST) or via scheduler windows service ( currently using Quartz.net).</p>

<p>Each call will run a list of tasks that can take 10-30 minutes.  I am getting 504 Gateway_Timeout error after 1 minute. I've tried increase the limit in WCF webservice but still getting the error.</p>

<pre><code>&lt;webHttpBinding&gt;
    &lt;binding name="webHttpBindingWithJsonP"  closeTimeout="00:30:00" openTimeout="00:30:00" receiveTimeout="00:30:00" sendTimeout="00:30:00" maxReceivedMessageSize="50000000" maxBufferSize="50000000" maxBufferPoolSize="50000000" crossDomainScriptAccessEnabled="true"/&gt;
  &lt;/webHttpBinding&gt;


 &lt;httpRuntime executionTimeout="1800" targetFramework="4.0"/&gt;
</code></pre>

<p>Regardless of the error, task will always complete. I am not sure if WCF is still running when web request is timed out? If a task need less time, for example half minute then it returns valid result.</p>

<p>I've tried trace logs with all switchvalue and use traceviewer to monitor the output, no errors were found. </p>

<p>My questions is should WCF service be designed as webHttpBinding service, or should I design it as a different type?</p>