シェアする

  • このエントリーをはてなブックマークに追加





【php】execでjavaコマンドを実行するとNative memory allocation (mmap) failed to map

シェアする

  • このエントリーをはてなブックマークに追加
  • 0

execでjavaコマンドを実行したところ、

[2022-02-20 09:36:42] production.INFO: #
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 2555904 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /tmp/hs_err_pid2458501.log

こんなエラーに遭遇。

メモリ割当エラーのようだけど、メモリに余裕があるので、

しばらくハマりました。

解決したので備忘録。

解決策

setsebool -P httpd_execmem on

これで一発でした。

どうやらhttpd(apache)でjavaを実行するときに必要なexecmemという

モジュールの実行を許可する設定みたい。

コチラコチラを参照。

結構時間かけてしまった。。。

それでは!!!

ブログランキング・にほんブログ村へ
にほんブログ村


人気ブログランキング

シェアする

  • このエントリーをはてなブックマークに追加

フォローはいかがですか?