{"id":427,"date":"2016-04-14T19:33:37","date_gmt":"2016-04-14T11:33:37","guid":{"rendered":"http:\/\/www.xttblog.com\/?p=427"},"modified":"2016-04-14T20:01:02","modified_gmt":"2016-04-14T12:01:02","slug":"tomcat-connector%e9%85%8d%e7%bd%ae%e8%af%a6%e8%a7%a3","status":"publish","type":"post","link":"https:\/\/www.xttblog.com\/?p=427","title":{"rendered":"Tomcat Connector\u914d\u7f6e\u8be6\u89e3"},"content":{"rendered":"<p>\n\t\u4f7f\u7528JMeter\u3001LoadRunner\u5728\u505a\u5927\u5e76\u53d1\u6d4b\u8bd5\u65f6\uff0c\u8be6\u7ec6\u7684\u7814\u7a76\u4e86Connector\u5404\u5927\u53c2\u6570\u7684\u914d\u7f6e\u8be6\u89e3\uff0c\u5728\u8fd9\u91cc\u7279\u610f\u5206\u4eab\u5982\u4e0b\uff1a\n<\/p>\n<p>\n\t<span style=\"font-family:georgia,serif\"><span style=\"font-size:18px\"><strong>maxThreads=&quot;1000&quot;<\/strong> \u6700\u5927\u5e76\u53d1\u6570&nbsp;<br \/>\n\t<strong>minSpareThreads=&quot;100&quot;<\/strong> \u521d\u59cb\u5316\u65f6\u521b\u5efa\u7684\u7ebf\u7a0b\u6570<br \/>\n\t<strong>maxSpareThreads=&quot;500&quot;<\/strong> \u4e00\u65e6\u521b\u5efa\u7684\u7ebf\u7a0b\u8d85\u8fc7\u8fd9\u4e2a\u503c\uff0cTomcat\u5c31\u4f1a\u5173\u95ed\u4e0d\u518d\u9700\u8981\u7684socket\u7ebf\u7a0b\u3002<br \/>\n\t<strong>minProcessors<\/strong>\uff1a\u6700\u5c0f\u7a7a\u95f2\u8fde\u63a5\u7ebf\u7a0b\u6570\uff0c\u7528\u4e8e\u63d0\u9ad8\u7cfb\u7edf\u5904\u7406\u6027\u80fd\uff0c\u9ed8\u8ba4\u503c\u4e3a10<br \/>\n\t<strong>maxProcessors<\/strong>\uff1a\u6700\u5927\u8fde\u63a5\u7ebf\u7a0b\u6570\uff0c\u5373\uff1a\u5e76\u53d1\u5904\u7406\u7684\u6700\u5927\u8bf7\u6c42\u6570\uff0c\u9ed8\u8ba4\u503c\u4e3a75<br \/>\n\t<strong>acceptCount<\/strong>\uff1a\u5141\u8bb8\u7684\u6700\u5927\u8fde\u63a5\u6570\uff0c\u5e94\u5927\u4e8e\u7b49\u4e8emaxProcessors\uff0c\u9ed8\u8ba4\u503c\u4e3a100\uff0c\u6307\u5b9a\u5f53\u6240\u6709\u53ef\u4ee5\u4f7f\u7528\u7684\u5904\u7406\u8bf7\u6c42\u7684\u7ebf\u7a0b\u6570\u90fd\u88ab\u4f7f\u7528\u65f6\uff0c\u53ef\u4ee5\u653e\u5230\u5904\u7406\u961f\u5217\u4e2d\u7684\u8bf7\u6c42\u6570\uff0c\u8d85\u8fc7\u8fd9\u4e2a\u6570\u7684\u8bf7\u6c42\u5c06\u4e0d\u4e88\u5904\u7406<br \/>\n\t<strong>enableLookups<\/strong>\uff1a\u662f\u5426\u53cd\u67e5\u57df\u540d\uff0c\u53d6\u503c\u4e3a\uff1atrue\u6216false\u3002\u4e3a\u4e86\u63d0\u9ad8\u5904\u7406\u80fd\u529b\uff0c\u5e94\u8bbe\u7f6e\u4e3afalse<br \/>\n\t<strong>connectionTimeout<\/strong>\uff1a\u7f51\u7edc\u8fde\u63a5\u8d85\u65f6\uff0c\u5355\u4f4d\uff1a\u6beb\u79d2\u3002\u8bbe\u7f6e\u4e3a0\u8868\u793a\u6c38\u4e0d\u8d85\u65f6\uff0c\u8fd9\u6837\u8bbe\u7f6e\u6709\u9690\u60a3\u7684\u3002\u901a\u5e38\u53ef\u8bbe\u7f6e\u4e3a30000\u6beb\u79d2\u3002<br \/>\n\t<strong>compression<\/strong>=&quot;on&quot; \u6253\u5f00\u538b\u7f29\u4f20\u8f93\u529f\u80fd\uff0c\u53d6\u503con\/off\/force\uff0c\u9ed8\u8ba4\u503coff\u3002force\u8868\u793a\u6240\u6709\u60c5\u51b5\u4e0b\u90fd\u8fdb\u884c\u538b\u7f29<br \/>\n\t<strong>compressionMinSize<\/strong>=&quot;2048&quot; \u542f\u7528\u538b\u7f29\u7684\u8f93\u51fa\u5185\u5bb9\u5927\u5c0f\uff0c\u8fd9\u91cc\u9762\u9ed8\u8ba4\u4e3a2KB<br \/>\n\t<strong>noCompressionUserAgents<\/strong>=&quot;gozilla, traviata&quot; \u5bf9\u4e8e\u4ee5\u4e0b\u7684\u6d4f\u89c8\u5668\uff0c\u4e0d\u542f\u7528\u538b\u7f29<br \/>\n\t<strong>compressableMimeType<\/strong>=&quot;text\/html,text\/xml,text\/javascript,image\/gif,image\/jpg&quot;\u538b\u7f29\u7c7b\u578b<br \/>\n\t<strong>keepAliveTimeout <\/strong>\u957f\u8fde\u63a5\u6700\u5927\u4fdd\u6301\u65f6\u95f4\uff08\u6beb\u79d2\uff09\u3002<br \/>\n\t<strong>maxKeepAliveRequests<\/strong> \u6700\u5927\u957f\u8fde\u63a5\u4e2a\u6570\uff081\u8868\u793a\u7981\u7528\uff0c-1\u8868\u793a\u4e0d\u9650\u5236\u4e2a\u6570\uff0c\u9ed8\u8ba4100\u4e2a\u3002\u4e00\u822c\u8bbe\u7f6e\u5728100~200\u4e4b\u95f4\uff09<br \/>\n\t<strong>maxHttpHeaderSize<\/strong> &#8211; http\u8bf7\u6c42\u5934\u4fe1\u606f\u7684\u6700\u5927\u7a0b\u5ea6\uff0c\u8d85\u8fc7\u6b64\u957f\u5ea6\u7684\u90e8\u5206\u4e0d\u4e88\u5904\u7406\u3002\u4e00\u822c8K\u3002<br \/>\n\t<strong>URIEncoding<\/strong> &#8211; \u6307\u5b9aTomcat\u5bb9\u5668\u7684URL\u7f16\u7801\u683c\u5f0f\u3002<br \/>\n\t<strong>disableUploadTimeout<\/strong> &#8211; \u4e0a\u4f20\u65f6\u662f\u5426\u4f7f\u7528\u8d85\u65f6\u673a\u5236<br \/>\n\t<strong>bufferSize<\/strong> \u8f93\u5165\u6d41\u7f13\u51b2\u5927\u5c0f\uff0c\u9ed8\u8ba4\u503c2048 bytes<br \/>\n\t<strong>allowTrace<\/strong>\uff1a\u662f\u5426\u5141\u8bb8HTTP\u7684TRACE\u65b9\u6cd5\uff0c\u9ed8\u8ba4\u4e3afalse<br \/>\n\t<strong>emptySessionPath<\/strong>\uff1a\u5982\u679c\u8bbe\u7f6e\u4e3atrue\uff0c\u7528\u6237\u7684\u6240\u6709\u8def\u5f84\u90fd\u5c06\u8bbe\u7f6e\u4e3a\/\uff0c\u9ed8\u8ba4\u4e3afalse\u3002<br \/>\n\t<strong>protocol<\/strong>\uff1a\u503c\u5fc5\u987b\u4e3aHTTP1.1\uff0c\u5982\u679c\u4f7f\u7528AJP\u5904\u7406\u5668\uff0c\u8be5\u503c\u5fc5\u987b\u4e3aAJP\/1.3<br \/>\n\t<strong>proxyName<\/strong>\uff1a\u5982\u8fd9\u4e2a\u8fde\u63a5\u5668\u6b63\u5728\u4e00\u4e2a\u4ee3\u7406\u914d\u7f6e\u4e2d\u88ab\u4f7f\u7528\uff0c\u6307\u5b9a\u8fd9\u4e2a\u5c5e\u6027\uff0c\u5728request.getServerName()\u65f6\u8fd4\u56de<br \/>\n\t<strong>redirectPort<\/strong>\uff1a\u5982\u8fde\u63a5\u5668\u4e0d\u652f\u6301SSL\u8bf7\u6c42\uff0c\u5982\u6536\u5230SSL\u8bf7\u6c42\uff0cCatalina\u5bb9\u5668\u5c06\u4f1a\u81ea\u52a8\u91cd\u5b9a\u5411\u6307\u5b9a\u7684\u7aef\u53e3\u53f7\uff0c\u8ba9\u5176\u8fdb\u884c\u5904\u7406\u3002<br \/>\n\t<strong>scheme<\/strong>\uff1a\u8bbe\u7f6e\u534f\u8bae\u7684\u540d\u5b57\uff0c\u5728request.getScheme()\u65f6\u8fd4\u56de\uff0cSSL\u8fde\u63a5\u5668\u8bbe\u4e3a&rdquo;https&rdquo;\uff0c\u9ed8\u8ba4\u4e3a&rdquo;http&rdquo;<br \/>\n\t<strong>secure<\/strong>\uff1a\u5728SSL\u8fde\u63a5\u5668\u53ef\u5c06\u5176\u8bbe\u7f6e\u4e3atrue\uff0c\u9ed8\u8ba4\u4e3afalse<br \/>\n\t<strong>useBodyEncodingForURI<\/strong>\uff1a\u4e3b\u8981\u7528\u4e8eTomcat4.1.x\u4e2d\uff0c\u6307\u793a\u662f\u5426\u4f7f\u7528\u5728contentType\u4e2d\u6307\u5b9a\u7684\u7f16\u7801\u6765\u53d6\u4ee3<br \/>\n\t<strong>port<\/strong>\uff1a\u670d\u52a1\u7aef\u5957\u63a5\u5b57\u76d1\u542c\u7684TCP\u7aef\u53e3\u53f7\uff0c\u9ed8\u8ba4\u503c\u4e3a8080\uff08\u5fc5\u987b\uff09<br \/>\n\t<strong>socketBuffer<\/strong>\uff1a\u8bbeSocket\u8f93\u51fa\u7f13\u51b2\u533a\u7684\u5927\u5c0f\uff08\u4ee5\u5b57\u8282\u4e3a\u5355\u4f4d\uff09\uff0c-1\u8868\u793a\u7981\u6b62\u7f13\u51b2\uff0c\u9ed8\u8ba4\u503c\u4e3a9000\u5b57\u8282<br \/>\n\t<strong>toNoDelay<\/strong>\uff1a\u4e3atrue\u65f6\uff0c\u53ef\u4ee5\u63d0\u9ad8\u6027\u80fd\u3002\u9ed8\u8ba4\u503c\u4e3atrue<br \/>\n\t<strong>threadPriority<\/strong>\uff1a\u8bbeJVM\u4e2d\u8bf7\u6c42\u5904\u7406\u7ebf\u7a0b\u4f18\u5148\u7ea7\u3002\u9ed8\u8ba4\u503c\u4e3aNORMAL-PRIORITY<\/span><\/span>\n<\/p>\n<p>\n\t<span style=\"font-family:georgia,serif\"><span style=\"font-size:18px\">\u4ee5\u4e0a\u914d\u7f6e\u90fd\u662f\u5728server.xml\u4e2d\u914d\u7f6e\u7684\uff0c\u5982\u679c\u60f3\u8981\u505a\u5230\u6700\u6709\uff0c\u6700\u597d\u5728\u914d\u5408\u8c03\u6574JVM\u5185\u5b58\uff0cWindows\u4e0b\u914d\u7f6e\u5982\u4e0b\uff1a<\/span><\/span>\n<\/p>\n<p>\n\t<span style=\"font-family:georgia,serif\"><span style=\"font-size:18px\">set JAVA_HOME=C:\\JAVA\\JDK15<br \/>\n\tset CATALINA_OPTS=-server -Xms 1400m -Xmx1400m -XX:PermSize=256m -XX:MaxPermSize=256m<\/span><\/span>\n<\/p>\n<p>\n\t<span style=\"font-family:georgia,serif\"><span style=\"font-size:18px\">\u5728\u505a\u538b\u529b\u6d4b\u8bd5\u7684\u540c\u65f6\u8fd8\u53ef\u4ee5\u8bbf\u95ee\u4f60\u7684http:\/\/localhost:8080\/manager\u8fdb\u884c\u6027\u80fd\u76d1\u89c6\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528\u6211\u4e4b\u524d\u5199\u8fc7\u7684\u4e00\u7bc7\u6587\u7ae0\u4e2d\u7528\u5230\u7684VisualVM\u8fdb\u884c\u5185\u5b58\u3001CPU\u3001\u7ebf\u7a0b\u3001\u5806\u6808\u8fdb\u884c\u76d1\u63a7\uff0c\u6587\u7ae0\u5730\u5740\uff1a<a href=\"http:\/\/www.xttblog.com\/?p=200\" target=\"_blank\">http:\/\/www.xttblog.com\/?p=200<\/a><\/span><\/span>\n<\/p>\n<p>\n\t<span style=\"font-family:georgia,serif\"><span style=\"font-size:18px\">\u5f53\u7136\u8fd9\u4e9b\u914d\u7f6e\u4e0d\u4e00\u5b9a\u5bf9\u4f60\u4eec\u5c31\u8d77\u4f5c\u7528\uff0c\u5177\u4f53\u8fd8\u662f\u8981\u770b\u7cfb\u7edf\u7684\u6027\u80fd\u914d\u7f6e\u4ee5\u53ca\u76f8\u5173\u7684\u4e1a\u52a1\uff0c\u6240\u4ee5\u5e0c\u671b\u5927\u5bb6\u80fd\u591f\u505a\u5230\u6d3b\u5b66\u6d3b\u7528\uff01<\/span><\/span><br \/>\n\t\u5176\u4e2d\u548c\u6700\u5927\u8fde\u63a5\u6570\u76f8\u5173\u7684\u53c2\u6570\u4e3amaxProcessors\u548cacceptCount\u3002\u5982\u679c\u8981\u52a0\u5927\u5e76\u53d1\u8fde\u63a5\u6570\uff0c\u5e94\u540c\u65f6\u52a0\u5927\u8fd9\u4e24\u4e2a\u53c2\u6570\u3002<\/p>\n<!-- <audio autoplay=\"autoplay\" height=\"100\" width=\"100\" hidden=\"true\"><source src=\"https:\/\/c.coka.la\/orAvPR.mp3\" type=\"audio\/mp3\"\/><\/audio><img decoding=\"async\" src=\"https:\/\/images.weserv.nl\/?url=https:\/\/ws3.sinaimg.cn\/large\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/> --><p><!-- <img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/xmt1139057136\/xttblog\/master\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/>--><img decoding=\"async\" src=\"https:\/\/saas.51autoparts.cn\/api\/admin\/sys-file\/oss\/file?fileName=84db51f8561e448f9a4fda2eff0811f9.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/><\/p><p>\u6700\u540e\uff0c\u6b22\u8fce\u5173\u6ce8\u6211\u7684\u4e2a\u4eba\u5fae\u4fe1\u516c\u4f17\u53f7\uff1a\u4e1a\u4f59\u8349\uff08yyucao\uff09\uff01<b>\u53ef\u52a0\u4f5c\u8005\u5fae\u4fe1\u53f7\uff1a<font color=\"red\">xttblog2<\/font>\u3002\u5907\u6ce8\uff1a\u201c1\u201d\uff0c\u6dfb\u52a0\u535a\u4e3b\u5fae\u4fe1\u62c9\u4f60\u8fdb\u5fae\u4fe1\u7fa4\u3002\u5907\u6ce8\u9519\u8bef\u4e0d\u4f1a\u540c\u610f\u597d\u53cb\u7533\u8bf7\u3002<\/b>\u518d\u6b21\u611f\u8c22\u60a8\u7684\u5173\u6ce8\uff01\u540e\u7eed\u6709\u7cbe\u5f69\u5185\u5bb9\u4f1a\u7b2c\u4e00\u65f6\u95f4\u53d1\u7ed9\u60a8\uff01\u539f\u521b\u6587\u7ae0\u6295\u7a3f\u8bf7\u53d1\u9001\u81f3532009913@qq.com\u90ae\u7bb1\u3002\u5546\u52a1\u5408\u4f5c\u4e5f\u53ef\u6dfb\u52a0\u4f5c\u8005\u5fae\u4fe1\u8fdb\u884c\u8054\u7cfb\uff01<\/p><p>\u672c\u6587\u539f\u6587\u51fa\u5904\uff1a<a href=\"https:\/\/www.xttblog.com\">\u4e1a\u4f59\u8349<\/a>\uff1a &raquo; <a href=\"https:\/\/www.xttblog.com\/?p=427\">Tomcat Connector\u914d\u7f6e\u8be6\u89e3<\/a><\/p><!-- <div class=\"bd-reward-stl\"><button id=\"bdRewardBtn\"><span><\/span><\/button><\/div> -->","protected":false},"excerpt":{"rendered":"<p>\u4f7f\u7528JMeter\u3001LoadRunner\u5728\u505a\u5927\u5e76\u53d1\u6d4b\u8bd5\u65f6\uff0c\u8be6\u7ec6\u7684\u7814\u7a76\u4e86Connector\u5404\u5927\u53c2\u6570\u7684\u914d\u7f6e\u8be6\u89e3\uff0c\u5728\u8fd9 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[168,169,170],"class_list":["post-427","post","type-post","status-publish","format-standard","hentry","category-java","tag-connector","tag-jmeter","tag-loadrunner"],"_links":{"self":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/427","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=427"}],"version-history":[{"count":4,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/427\/revisions"}],"predecessor-version":[{"id":431,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/427\/revisions\/431"}],"wp:attachment":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=427"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=427"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=427"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}