Hybris服务器显示垃圾回收问题?

时间:2019-03-14 09:55:06

标签: java tomcat garbage-collection wrapper hybris

我最近安装的Java采用JDK 1.8.0_202版本。

它第一次运行良好,后来当我启动hybris服务器时,再次在控制台上再次出现以下问题:

JVMJ9GC063E Unable to open file '/opt/hybris/log/tomcat/java_gc_ger-d-maa-apsp-001.log' for writing

<allocation-stats totalBytes="223210880" >
  <allocated-bytes non-tlh="13688" tlh="223197192" />
  <largest-consumer threadName="localhost-startStop-1" threadId="0000000002F7B000" bytes="217285784" />
</allocation-stats>
<gc-op id="2563" type="scavenge" timems="53.990" contextid="2560" timestamp="2019-03-14T15:18:57.791">
  <scavenger-info tenureage="14" tenuremask="4000" tiltratio="88" />
  <memory-copied type="nursery" objects="394430" bytes="16048744" bytesdiscarded="115760" />
  <finalization candidates="204" enqueued="174" />
  <ownableSynchronizers candidates="3195" cleared="7" />
  <references type="soft" candidates="9645" cleared="0" enqueued="0" dynamicThreshold="32" maxThreshold="32" />
  <references type="weak" candidates="6673" cleared="84" enqueued="67" />
</gc-op>
<gc-end id="2564" type="scavenge" contextid="2560" durationms="54.398" usertimems="46.801" systemtimems="0.000" timestamp="2019-03-14T15:18:57.791" activeThreads="2">
  <mem-info id="2565" free="564246568" total="1073741824" percent="52">
    <mem type="nursery" free="224266520" total="268435456" percent="83">
      <mem type="allocate" free="224266520" total="240451584" percent="93" />
      <mem type="survivor" free="0" total="27983872" percent="0" />
    </mem>
    <mem type="tenure" free="339980048" total="805306368" percent="42" macro-fragmented="3110739">
      <mem type="soa" free="299715344" total="765041664" percent="39" />
      <mem type="loa" free="40264704" total="40264704" percent="100" />
    </mem>
    <pending-finalizers system="174" default="0" reference="67" classloader="0" />
    <remembered-set count="33247" />
  </mem-info>
</gc-end>
<cycle-end id="2566" type="scavenge" contextid="2560" timestamp="2019-03-14T15:18:57.792" />
<allocation-satisfied id="2567" threadId="0000000002F7B000" bytesRequested="48" />
<af-end id="2568" timestamp="2019-03-14T15:18:57.792" threadId="0000000002F7B988" success="true" from="nursery"/>
<exclusive-end id="2569" timestamp="2019-03-14T15:18:57.792" durationms="55.438" />

<exclusive-start id="2570" timestamp="2019-03-14T15:19:06.478" intervalms="8740.918">
  <response-info timems="0.039" idlems="0.039" threads="0" lastid="0000000002F7B000" lastname="localhost-startStop-1" />
</exclusive-start>
<af-start id="2571" threadId="0000000002F7B988" totalBytesRequested="24" timestamp="2019-03-14T15:19:06.478" intervalms="8740.939" type="nursery" />
<cycle-start id="2572" type="scavenge" contextid="0" timestamp="2019-03-14T15:19:06.478" intervalms="8740.941" />
<gc-start id="2573" type="scavenge" contextid="2572" timestamp="2019-03-14T15:19:06.479">
  <mem-info id="2574" free="339975744" total="1073741824" percent="31">
    <mem type="nursery" free="0" total="268435456" percent="0">
      <mem type="allocate" free="0" total="240451584" percent="0" />
      <mem type="survivor" free="0" total="27983872" percent="0" />
    </mem>
    <mem type="tenure" free="339975744" total="805306368" percent="42">
      <mem type="soa" free="299711040" total="765041664" percent="39" />
      <mem type="loa" free="40264704" total="40264704" percent="100" />
    </mem>
    <remembered-set count="34712" />
  </mem-info>
</gc-start>

有什么帮助吗? 谢谢, 穆罕默德

1 个答案:

答案 0 :(得分:0)

此日志由import android.app.Activity; import android.graphics.Bitmap; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.ImageView; import android.widget.TextView; public class Customadapter extends ArrayAdapter<String> { private String[] androidosnames; //private String[] urls; private Bitmap[] bitmaps; private Activity context; public Customadapter(Activity context, String[] androidosnames, Bitmap[] bitmaps ) { super(context, R.layout.activity_delivery, androidosnames); this.context = context; // this.urls = urls; this.bitmaps = bitmaps; this.androidosnames = androidosnames; } @Override public View getView(int position, View convertView, ViewGroup parent) { LayoutInflater inflater = context.getLayoutInflater(); View listViewItem = inflater.inflate(R.layout.layout, null, true); TextView androidos = (TextView) listViewItem.findViewById(R.id.tvandroidosnames); // TextView textView = (TextView) listViewItem.findViewById(R.id.tvurl); // textView.setText(urls[position] ); androidos.setText(androidosnames[position] ); ImageView image = (ImageView) listViewItem.findViewById(R.id.imgvw); image.setImageBitmap(Bitmap.createScaledBitmap(bitmaps[position], 100, 50, false)); return listViewItem; } }(或类似的JVM)选项生成。

如果不需要此日志,则应删除该选项。