Skip to content

Commit

Permalink
Merge pull request #338 from BeliefYou8/UAVStackXingshengliLLL
Browse files Browse the repository at this point in the history
The memory leak problem of apphubManager
  • Loading branch information
BeliefYou8 authored Jul 6, 2018
2 parents b70732d + 5398f56 commit 30f2d2d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion com.creditease.uav.healthmanager.buildComponent/bin/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export CLASSPATH=bin/com.creditease.uav.base-1.0-boot.jar
echo $CLASSPATH
javaAgent="-javaagent:../uavmof/com.creditease.uav.agent/com.creditease.uav.monitorframework.agent-1.0-agent.jar"
javaOpts="-server -Xms256m -Xss256k -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:+CMSIncrementalPacing -XX:CMSIncrementalDutyCycleMin=0 -XX:CMSIncrementalDutyCycle=10 -XX:+UseParNewGC -XX:+UseCMSCompactAtFullCollection -XX:-CMSParallelRemarkEnabled -XX:CMSFullGCsBeforeCompaction=0 -XX:CMSInitiatingOccupancyFraction=70 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=."
$executeJava $javaAgent $3 $javaOpts -XX:OnOutOfMemoryError='kill -9 %p' -DNetCardIndex=0 -DJAppID=$1 -DJAppGroup=UAV -classpath $CLASSPATH com.creditease.mscp.boot.MSCPBoot -p $2 &
$executeJava $javaAgent $3 $javaOpts -XX:OnOutOfMemoryError='kill -9 %p' -DNetCardIndex=0 -DJAppID=$1 -DJAppGroup=UAV -Dsun.net.httpserver.maxReqTime=300 -Dsun.net.httpserver.maxRspTime=300 -classpath $CLASSPATH com.creditease.mscp.boot.MSCPBoot -p $2 &

# add crontab process watcher
if [ "$proc_watcher" == "yes" ]; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ feature.apphubmanager.http.port=8011
feature.apphubmanager.http.backlog=10
feature.apphubmanager.http.core=10
feature.apphubmanager.http.max=50
feature.apphubmanager.http.bqsize=10
feature.apphubmanager.http.bqsize=100
#feature.DBSource.AppHubMgt
feature.apphubmanager.ds.enable=true
feature.apphubmanager.ds.servers=127.0.0.1:27017
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ public void start() {
@SuppressWarnings({ "rawtypes", "unchecked" })
ThreadPoolExecutor exe = new ThreadPoolExecutor(core, max, 30000, TimeUnit.MILLISECONDS,
new ArrayBlockingQueue(bqsize));
// 调用线程执行多余任务
exe.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
apphubManagerServerListenWorker.start(exe, port, backlog);

if (log.isTraceEnable()) {
Expand Down

0 comments on commit 30f2d2d

Please sign in to comment.