Due to the many exceptions recently reported in my own project: org. apache. http. conn. connectionPoolTimeoutException: Timeout waiting for connection. So I have studied the connection information and summarized the following points: 1. Set the maximum number of connections static {httpParams = new BasicHttpParams (); // set the maximum number of connections ConnManagerParams. setMaxTotalConnections (httpParams, 600); // sets the maximum wait time for obtaining the connection. setTimeout (httpParams, 60000); // sets the maximum number of connections for each route. ConnPerRouteBean connPerRoute = new ConnPerRou TeBean (300); ConnManagerParams. setMaxConnectionsPerRoute (httpParams, connPerRoute); // you can specify the connection timeout value for HttpConnectionParams. setConnectionTimeout (httpParams, 10000); // sets the read timeout value for HttpConnectionParams. setSoTimeout (httpParams, 10000); 2. Close the public static String readNet (String urlPath) {StringBuffer sb = new StringBuffer (); HttpClient client = null; inputStream in = null; InputStreamReader isr = null; HttpGet = new HttpGet (); try {client = HttpConnectionManager. getHttpClient (); get. setURI (new URI (urlPath); HttpResponse response = client.exe cute (get); if (response. getStatusLine (). getStatusCode ()! = 200) {get. abort (); return null;} HttpEntity entity = response. getEntity (); if (entity! = Null) {in = entity. getContent ();......} return sb. toString ();} catch (Exception e) {get. abort (); e. printStackTrace (); return null;} finally {if (isr! = Null) {try {isr. close () ;}catch (IOException e) {e. printStackTrace () ;}} if (in! = Null) {try {in. close ();} catch (IOException e) {e. printStackTrace () ;}}} 3. Set tomcat Connections 1. Modify the maximum number of connections at/opt/probe/patrol/tomcat_plan_5535/conf/server. <Connector port = "80" maxHttpHeaderSize = "8192" maxThreads = "600" minSpareThreads = "25" maxSpareThreads = "75" enableLookups = "false" redirectPort = "8443" acceptCount = "100" connectionTimeout = "20000" disableUploadTimeout = "true" URIEncoding = "UTF-8"/>