Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

Http Timeout Config Not Working

Avatar

Level 5

Hi,

I'm attempting to change the http timeout for my local AEM instance. I made the following change in the OSGI console:

Screen Shot 2019-04-02 at 22.38.48.png

I verified in

/opt/aem/publish/crx-quickstart/launchpad/config/org/apache/felix/http.config

that it has indeed changed:

Screen Shot 2019-04-02 at 22.47.42.png

I am testing it using the following servlet:

@Slf4j
@Component(

   immediate = true,
   service = Servlet.class,
   property = {

   "sling.servlet.paths=/bin/test/foo",
   "sling.servlet.methods=get"
   },
   configurationPid = "TestServlet")

public class TestServlet extends SlingSafeMethodsServlet {

  @Override
  protected void doGet(@Nonnull SlingHttpServletRequest request,
   @Nonnull SlingHttpServletResponse response) {

   try {

   //sleep for 10 seconds
   Thread.sleep(10000);
   response.getWriter().write("<html>Should have timed out.</html>");
   } catch (Exception e) {

   throw new RuntimeException(e);
   }

  }

}

But it seems not to be working as it should have timed out but didn't:

Screen Shot 2019-04-02 at 22.48.33.png

Any help?

0 Replies