トップ 差分 一覧 ソース 置換 検索 ヘルプ PDF RSS ログイン

tomcat のエラーについて

java.lang.OutOfMemoryError: PermGen space

http://wingeek.blog39.fc2.com/blog-entry-44.html

tomcat6.conf


JAVA_OPTS


 -XX:MaxPermSize=128m

を設定する。 メモリのサイズはテキトウに。

tomcat のメモリリーク防止機能

http://www.atmarkit.co.jp/fjava/rensai4/tomcat7_03/02.html

JDBCドライバの参照をクリア

Webアプリケーションを停止するときに、ロードされているすべてのJDBCドライバから停止するWebアプリケーションのクラスローダによってロードされたJDBCドライバをderegisterDriverします。

これにより、JDBCドライバの参照残によるWebAppクラスローダのリークを防止します。このとき、以下のようなメッセージがエラーレベルで出力されます。

The web application 【コンテキスト名】 registered the JDBC driver 【ドライバ名】 but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.

実行中スレッドの停止

Webアプリケーション停止時に、停止するWebアプリケーションのWebAppクラスローダがコンテキストクラスローダとなっている全ての実行中スレッドを停止します。

デフォルトでは、この機能をON/OFFする属性のclearReferencesStopThreadsやclearReferencesStopTimerThreadsがfalseに設定されているため、実際の停止までは行わず、以下のようなエラーメッセージのみを出力します

リクエスト処理スレッドが実行中の場合

The web application 【コンテキスト名】 is still processing a request that has yet to finish. This is very likely to create a memory leak. You can control the time allowed for requests to finish by using the unloadDelay attribute of the standard Context implementation.

リクエスト処理スレッド以外のスレッドが実行中の場合

The web application【コンテキスト名】 appears to have started a thread named 【スレッド名】 but has failed to stop it. This is very likely to create a memory leak.


[カテゴリ: プログラミング言語 > Servlet & Struts]

[通知用URL]



  • Hatenaブックマークに追加
  • livedoorクリップに追加
  • del.icio.usに追加
  • FC2ブックマークに追加

最終更新時間:2012年07月24日 22時07分49秒