尊龙凯时人生就是搏

ʹÓø¡Í¼Ãæ°å¾ÙÐÐJavaÐéÄâ»úµÄÓÅ»¯ÉèÖÃ

Ëæ×Å»¥ÁªÍøµÄÒ»Ö±Éú³¤£¬Ô½À´Ô½¶àµÄÓ¦ÓÃÓëÓªÒµ¶¼ÐèҪʹÓõ½javaÓïÑÔ¿ª·¢µÄ³ÌÐò¡£¶ø¹ØÓÚjava³ÌÐòµÄÔËÐУ¬javaÐéÄâ»ú£¨jvm£©µÄÐÔÄܾÍÏԵúÜÊÇÖ÷Òª¡£Òò´Ë£¬¾ÙÐÐÓÅ»¯ÉèÖÃÊÇÌá¸ßjavaÓ¦ÓóÌÐòÐÔÄܵÄÖ÷ÒªÊֶΡ£¸¡Í¼Ãæ°åÊÇÒ»¿î³£ÓõÄЧÀÍÆ÷¿ØÖÆÃæ°å£¬¿ÉÒÔ×ÊÖúÓû§¸üÀû±ãµØ¾ÙÐÐЧÀÍÆ÷ÖÎÀí¡£±¾ÎĽ«ÏÈÈÝÔõÑùʹÓø¡Í¼Ãæ°å¶ÔjavaÐéÄâ»ú¾ÙÐÐÓÅ»¯ÉèÖá£

µÚÒ»²½£º×°ÖÃJavaÐéÄâ»ú

Ê×ÏÈÐèÒªÔÚЧÀÍÆ÷ÉÏ×°ÖÃ׼ȷ°æ±¾µÄJavaÐéÄâ»ú¡£¿ÉÒÔͨ¹ýÒÔÏÂÏÂÁî¾ÙÐÐÅÌÎÊ£º

java -version

µÇ¼ºó¸´ÖÆ

ÈôδװÖã¬ÔòÐèҪʹÓÃÒÔÏÂÏÂÁî¾ÙÐÐ×°Öãº

yum install java-1.8.0-openjdk-devel.x86_64

µÇ¼ºó¸´ÖÆ

µÚ¶þ²½£ºÔÚ¸¡Í¼Ãæ°åÖÐÌí¼ÓJavaÓ¦ÓÃ

Á¬Ã¦Ñ§Ï°¡°JavaÃâ·ÑѧϰÌõ¼Ç£¨ÉîÈ룩¡±£»

·­¿ª¸¡Í¼ÖÎÀíÃæ°å£¬²¢½«Êó±êÒƶ¯ÖÁ×ó²à²Ëµ¥À¸Öеġ°ÍøÕ¾¡±Ñ¡ÏȻºóÑ¡Ôñ¡°Ìí¼ÓÕ¾µã¡±£¬ÊäÈëÕ¾µãÏà¹ØÐÅÏ¢²¢ÉúÑÄ¡£

ÔÚÕ¾µãÁбíÒ³ÃæÖУ¬µã»÷¸Õ¸ÕÌí¼ÓµÄÕ¾µãÃû³Æ£¬½øÈëÕ¾µãÉèÖýçÃæ¡£ÔÚ¡°Ó¦Óá±Ñ¡ÏîÖУ¬Ñ¡Ôñ¡°Java¡±£¬²¢ÌîдJavaÔËÐÐËùÐèµÄ²ÎÊý¡£

µÚÈý²½£ºÉèÖÃJVM²ÎÊý

½øÈëÕ¾µãĿ¼ÏµÄconfĿ¼£¬±à¼­Îļþserver.xml£¬²¢ÕÒµ½ÒÔÏ´úÂë¶Î£º

<Connector executor="tomcatThreadPool" port="80" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="443" />

µÇ¼ºó¸´ÖÆ

ÔÚÕâ¶Î´úÂëÏ·½£¬Ìí¼ÓÒÔÏ´úÂ룺

<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
            maxThreads="400" minSpareThreads="25"
            maxIdleTime="60000" />

µÇ¼ºó¸´ÖÆ

ÕâÑù¿ÉÒÔÔöÌíTomcatÈÝÆ÷µÄ´¦ÀíÄÜÁ¦£¬²¢ÏÔÖøÌá¸ßJavaÓ¦ÓóÌÐòµÄÐÔÄÜ¡£

ÔÚͬÑùµÄserver.xmlÎļþÖУ¬ÕÒµ½ÒÔÏ´úÂë¶Î£º

<!-- maxThreads£ºÆôÓõÄ×î´óÏß³ÌÊý£»minSpareThreads£º±£´æµÄ×îСÏß³ÌÊý£» -->
<Connector port="8080" protocol="HTTP/1.1"
           connectionTimeout="20000"
           redirectPort="8443" />

µÇ¼ºó¸´ÖÆ

ÐÞ¸ÄÆäÖÐmaxThreadsºÍminSpareThreads²ÎÊý£¬ÀýÈç¸ÄΪÒÔÏÂÄÚÈÝ£º

<Connector port="8080" protocol="HTTP/1.1"
           connectionTimeout="20000"
           redirectPort="8443"  maxThreads="800" minSpareThreads="50"/>

µÇ¼ºó¸´ÖÆ

Õâ»áʹTomcatÈÝÆ÷Ô½·¢ÎȹÌ£¬²¢Ê¹ÐÔÄÜ»ñµÃÓÐÓÃÌáÉý¡£

µÚËIJ½£ºÉèÖÃJVM²ÎÊý

ÔٴνøÈëÕ¾µãĿ¼ÏµÄconfĿ¼£¬ÕÒµ½Îļþcatalina.sh£¬²¢±à¼­¸ÃÎļþ¡£ÔÚÎļþĩβÌí¼ÓÒÔÏ´úÂ룺

JAVA_OPTS="-server -Xms2048m -Xmx5296m -Xmn2048m -XX:MetaspaceSize=512M -XX:MaxMetaspaceSize=1024m -XX:SurvivorRatio=6 -XX:+DisableExplicitGC"
export JAVA_OPTS

µÇ¼ºó¸´ÖÆ

Õâ¶Î´úÂëÉèÖÃÁËJavaÔËÐÐʱµÄһЩ²ÎÊý£¬Èç¶ÑÄÚ´æ¾Þϸ¡¢Metaspace¾ÞϸµÈ¡£Æ¾Ö¤ÏÖÕæÏàÐΣ¬¿ÉÒÔÊʵ±µ÷½âÕâЩ²ÎÊýÒÔ»ñµÃ¸üºÃµÄÐÔÄÜ¡£ÕâÑùÉèÖúó£¬TomcatÈÝÆ÷½«Ê¹Óøü¸ßЧµÄÀ¬»ø½ÓÄÉ·½·¨£¬ÒÔ¼°¸üºÏÀíµÄÄÚ´æ·ÖÅÉ·½·¨£¬´Ó¶øÌá¸ßJava³ÌÐòµÄÖ´ÐÐЧÂÊ¡£

µÚÎå²½£ºÖØÆôЧÀÍÆ÷»òTomcatÈÝÆ÷

ÔÚÍê³ÉÉÏÊöÉèÖúó£¬ÐèÒªÖØÆôЧÀÍÆ÷»òTomcatÈÝÆ÷£¬ÒÔʹÉèÖÃÉúЧ¡£¿ÉÔÚ¸¡Í¼ÖÎÀíÃæ°åÖоÙÐвÙ×÷£¬»òÕßʹÓÃÒÔÏÂÏÂÁ

systemctl restart tomcat

µÇ¼ºó¸´ÖÆ

×ܽá

ÒÔÉϾÍÊÇʹÓø¡Í¼Ãæ°å¾ÙÐÐJavaÐéÄâ»úÓÅ»¯ÉèÖõÄÏà¹Ø°ì·¨¡£Í¨¹ýºÏÀíµÄÉèÖ㬿ÉÒÔÏÔÖøÌáÉýJavaÓ¦ÓóÌÐòµÄÐÔÄÜ£¬²¢Ê¹ÆäÔ½·¢Îȹ̿ɿ¿¡£ÔÚ¾ÙÐÐÓÅ»¯ÉèÖÃʱ£¬ÐèҪƾ֤ÏÖÕæÏàÐξÙÐкÏÀíµ÷½â£¬ÒÔ»ñµÃ×î¼ÑµÄÐÔÄÜÌåÏÖ¡£

ÒÔÉϾÍÊÇʹÓø¡Í¼Ãæ°å¾ÙÐÐJavaÐéÄâ»úµÄÓÅ»¯ÉèÖõÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí£¬°æȨÕùÒéÓë±¾Õ¾Î޹أ¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í尊龙凯时人生就是搏ÂËÓÍ»úÍø¹Ù·½Ì¬¶È£¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ£¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢£¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢£¬ÇëÄúÁ¬Ã¦ÁªÏµ尊龙凯时人生就是搏ʵʱÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ尊龙凯时人生就是搏

18523999891

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎ壬9:30-18:30£¬½ÚãåÈÕÐÝÏ¢

QR code
sitemap¡¢ÍøÕ¾µØͼ