We are using DXA 1.5 and we have a requirement that we need to set timeout value for the content service so that if the content is not being retrieve say within 30 seconds we need to throw 502 error page. I have checked the cd_storage_config file for content service but couldn't see any appropriate attribute. Are there any setting available we can set for service timeout from DXA config.

Thanks, Indra

3 Answers 3


As per best of my knowledge, there is no configuration available in the DXA framework to configure timeout of any request. You may do it using standard http request time out setting(code may vary for .Net and Java). To handle it in your application code you can create your own controller and write code to handle(throw 502 error) it. You can do timeout setting in DXA .Net in web configuration file using:

  <httpRuntime executionTimeout="30" /> 

or if you want to set if for any specific controller action:

<location path="ControllerName/ActionName">
        <httpRuntime executionTimeout="30"/>

In Controller code:

HttpContext.Server.ScriptTimeout = 30;
  • Hi Mukesh I have tried both options but there is no effect as such. Well after going through an article from ASP.Net team I found that ExecutionTimeout / ScriptTimeout only apply to synchronous handlers in ASP.NET. Both MVC and Web API are completely asynchronous (even if you're not using async controllers) pipelines, so ExecutionTimeout / ScriptTimeout have no effect.
    – Indra
    May 2, 2017 at 14:33

You could try adding the following configuration to Web.Config under appSettings:

    ... other content service related config here ...
    <add key="service-timeout" value="30" />

This should set the timeout for all the Content Delivery microservices to 30 seconds.


you can set the timeout value in cd_storage_conf.xml by adding the Transaction tag

   <Transaction Timeout="240000" MonitorInterval="5000" />

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.