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