How to set timeout for sling servlet in AEM6.4 | Community
Skip to main content
Level 2
Feb 7, 2019 3:46 PM UTC
Solved

How to set timeout for sling servlet in AEM6.4

Hi Team,

We are using sling servlet with POST method in our AEM6.4 application. We are receiving "504 Gateway timeout" response, due to long processing (we are connecting to external service from sling servlet) time. Could you please let me know, if there is way to fix it like changing timeout for sling servlet.

<form action="/slingservlet" method="POST">

        <button class="coral-Link coral-Button">Post Request</button>

    </form>

Thanks

Seran

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
joerghoh
joerghohAccepted solution
Employee
Feb 7, 2019 7:46 PM UTC

This is a timeout because the server does not send any data over some time. You should either send data during processing or rather implement this as workflow or sling job. Then you can inititate the job, and regularly check the status. No need to worry about timeouts anymore.

HTH,

Jörg

3 replies

joerghoh
joerghohAccepted solution
Employee
Feb 7, 2019 7:46 PM UTC

This is a timeout because the server does not send any data over some time. You should either send data during processing or rather implement this as workflow or sling job. Then you can inititate the job, and regularly check the status. No need to worry about timeouts anymore.

HTH,

Jörg

Translate
Level 2
Jun 23, 2023 3:23 PM UTC

How we can send data during processing?

Translate
Gaurav-Behl
Level 10
Feb 7, 2019 4:20 PM UTC

Probably it's happening in dispatcher but validate AEM as well. check both configs mentioned below:

/system/console/configMgr -- Apache Felix Jetty Based HTTP Service

dispatcher.any  - /rend { timeout }

share the logs, if it doesn't resolve.

Translate