Tomcat Server Timeout 504

Source: Internet
Author: User

Server 504 Timeout, check log found the cable lock inside the log4j, view log4j configuration, inside all the log is printed processing (Log4j.rootlogger=error,stdout,filelog, Fileerr and Hibernate debug log output), after modification to delete unnecessary output, and update log4j version (by 1.2.15-1.2.17), the server concurrency capability significantly improved.

But a few days later appeared 504, found a memory leak, check code discovery with XStream,

Error code:

XStream Siteupdatestream = new XStream (new Staxdriver (New Nonamecoder ()));

Siteupdatestream.autodetectannotations (TRUE);

Siteupdatestream.alias ("root", baseinfositeupdateinput.class);

Found in the method every call, the server's persistent memory will increase, and the greater the amount of concurrent memory consumption of the more quickly resulting in server 504.

After modification:

private static XStream Carrierdelstream = new XStream (new Staxdriver (New Nonamecoder ()));

Change to a static variable and modify the jar version number com.thoughtworks.xstream1.44 to 1.48 to discover that the memory is not leaking;


Tomcat Server Timeout 504

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.