Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the fakerpress domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/kusanagi/www.azuma-hub.com/DocumentRoot/wp-includes/functions.php on line 6114
AzumaHub

AzumaHub

OOM テスト実行ページ

以下の各ボタンをクリックして、それぞれのOOM状況を再現・観察できます。

① PHPのメモリ使用過多テスト

▶ 実行
$data = str_repeat("x", 1024 * 1024 * 60); // 約60MB 確保
PHPスクリプトで大量の文字列を確保。
memory_limit が低いと Fatal error で終了。

② MariaDBに負荷をかけるクエリ

▶ 実行
$results = $wpdb->get_results("SELECT a.* FROM posts a JOIN postmeta b ON a.ID = b.post_id ORDER BY RAND() LIMIT 100000");
MariaDBのJOIN + ORDER BY RAND() + LIMITで重いクエリを実行。
DBが圧迫され、スロークエリやOOMに繋がる場合あり。

③ PHP+OSメモリ全体使用量確認

▶ 実行
for ($i = 0; $i < 2000000; $i++) { $data[] = md5($i); }
連続処理でメモリを使い、htopdmesg でOS圧迫状況を観察。
同時アクセスと組み合わせるとOOMが起きやすい。