HOME DOCUMENTATION DOWNLOADS BLOG

Setting Up Request Timeout for HTML5 Instance

Origam HTML5 is usually set up behind a proxy server. Either behind IIS or NGINX. Depending on the setup, the long running requests might end up with a timeout error from the proxy server.

#IIS

There are two options how to prevent timeout problem.

  1. Set hosting model to InProcess.
<configuration>
  <location path="." inheritInChildApplications="false">
    <system.webServer>
      <handlers>
        <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
      </handlers>
      <aspNetCore processPath="dotnet" arguments=".\Origam.ServerCore.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="InProcess" />
    </system.webServer>
  </location>
</configuration>
  1. Set requestTimeout property - by default the value is 2 minutes.
<configuration>
  <location path="." inheritInChildApplications="false">
    <system.webServer>
      <handlers>
        <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
      </handlers>
      <aspNetCore requestTimeout="00:06:00" processPath="dotnet" arguments=".\Origam.ServerCore.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="OutOfProcess" />
    </system.webServer>
  </location>
</configuration>

#NGINX

server {

proxy_read_timeout 360;
proxy_connect_timeout 360;
proxy_send_timeout 360;

}

Numbers are in second. In this example is timeout set to 6 minute.