Sometimes when we try to fetch very large results from a database (transactions), it may take hell lot of time. But within that time, our server will get timed out and show you a timeout error. Argh, annoying. Isn’t it?  This may even happen when we are involved in an important task which may take hours to complete. Usually, the Wildfly server may get a timeout by 300 seconds (5 minutes) for a transaction. We can change this timeout problem by just adding a small piece of code in the standalone.xml file which will be available in \wildfly-8.0.0.Final\standalone\configuration.  Below, I have provided the code change which is required to alter the timeout. First, open standalone.xml and search for

<subsystem xmlns="urn:jboss:domain:transactions:2.0">

default code will be like:

<subsystem xmlns="urn:jboss:domain:transactions:2.0">
 <core-environment>
 <process-id>
 <uuid/>
 </process-id>
 </core-environment>
 <recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>
 </subsystem>

In the code given above, you can change timeout as per your need. All you have to do is just add one more line of code in the subsystem.

<coordinator-environment default-timeout="600" />

So that the edited piece of the configuration file will look like the below one:

<subsystem xmlns="urn:jboss:domain:transactions:2.0">
            <core-environment>
                <process-id>
                    <uuid/>
                </process-id>
            </core-environment>
            <recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>           
            <coordinator-environment default-timeout="600" />
        </subsystem>

If we are adding the above code, hooray!!! The timeout is changed. Hope this helped you.

Share this article:
Share

Comments (4)

  1. Thank you man

  2. The screenshots have disappeared. Could you please paste once again?

    1. Hello Forestone,

      Code snippets are back. Thanks for letting us know.

  3. what is the default time out for wildfy 10.1.0 .
    if the below line is not included in standalone.xml what is the default time out for jboss

Leave a Reply

Your email address will not be published. Required fields are marked *


Stay in touch!

You have successfully subscribed to the newsletter

There was an error while trying to send your request. Please try again.

Technicles will use the information you provide on this form to be in touch with you and to provide updates and marketing.