apache2 使用 PHP-FPM 截断 error_log 消息

apache2 使用 PHP-FPM 截断 error_log 消息

我有一个配置为使用 php-fpm 为多个网站提供服务的 apache2 服务器。每个网站都有一个自定义的 error_log 文件, ErrorLog "/var/log/apache2/error_log-example.com" 使用以下 php 代码

<?php

$log = [];
for($i = 10;$i<20;$i++) {
   for($j = 0;$j<159;$j++) {
      $log[$i][] = "$i-$j";
   }
}

foreach($log as $l) error_log(implode(" ", $l));

每次访问该页面时我都会收到以下错误日志行:

[2022-09-06 18:58:14.740439] [R:y/4lGs2gyxk] Request 2 on C:wiEmGs2gyxk pid:1860521 tid:140586963171072
[2022-09-06 18:58:14.740446] [R:y/4lGs2gyxk] UA: Wget/1.21
[2022-09-06 18:58:14.740450] [R:y/4lGs2gyxk] [proxy_fcgi:error] AH01071: Got error 'PHP message: 10-0 10-1 10-2 10-3 10-4 10-5 10-6 10-7 10-8 10-9 10-10 10-11 10-12 10-13 10-14 10-15 10-16 10-17 10-18 10-19 10-20 10-21 10-22 10-23 10-24 10-25 10-26 10-27 10-28 10-29 10-30 10-31 10-32 10-33 10-34 10-35 10-36 10-37 10-38 10-39 10-40 10-41 10-42 10-43 10-44 10-45 10-46 10-47 10-48 10-49 10-50 10-51 10-52 10-53 10-54 10-55 10-56 10-57 10-58 10-59 10-60 10-61 10-62 10-63 10-64 10-65 10-66 10-67 10-68 10-69 10-70 10-71 10-72 10-73 10-74 10-75 10-76 10-77 10-78 10-79 10-80 10-81 10-82 10-83 10-84 10-85 10-86 10-87 10-88 10-89 10-90 10-91 10-92 10-93 10-94 10-95 10-96 10-97 10-98 10-99 10-100 10-101 10-102 10-103 10-104 10-105 10-106 10-107 10-108 10-109 10-110 10-111 10-112 10-113 10-114 10-115 10-116 10-117 10-118 10-119 10-120 10-121 10-122 10-123 10-124 10-125 10-126 10-127 10-128 10-129 10-130 10-131 10-132 10-133 10-134 10-135 10-136 10-137 10-138 10-139 10-140 10-141 10-142 10-143 10-144 10-145 10-146 10-147 10-148 10-149 10-150 10-151 10-152 10-153 10-154 10-155 10-156 10-157 10-158PHP message: 11-0 11-1 11-2 11-3 11-4 11-5 11-6 11-7 11-8 11-9 11-10 11-11 11-12 11-13 11-14 11-15 11-16 11-17 11-18 11-19 11-20 11-21 11-22 11-23 11-24 11-25 11-26 11-27 11-28 11-29 11-30 11-31 11-32 11-33 11-34 11-35 11-36 11-37 11-38 11-39 11-40 11-41 11-42 11-43 11-44 11-45 11-46 11-47 11-48 11-49 11-50 11-51 11-52 11-53 11-54 11-55 11-56 11-57 11-58 11-59 11-60 11-61 11-62 11-63 11-64 11-65 11-66 11-67 11-68 11-69 11-70 11-71 11-72 11-73 11-74 11-75 11-76 11-77 11-78 11-79 11-80 11-81 11-82 11-83 11-84 11-85 11-86 11-87 11-88 11-89 11-90 11-91 11-92 11-93 11-94 11-95 11-96 11-97 11-98 11-99 11-100 11-101 11-102 11-103 11-104 11-105 11-106 11-107 11-108 11-109 11-110 11-111 11-112 11-113 11-114 11-115 11-116 11-117 11-118 11-119 11-120 11-121 11-122 11-123 11-124 11-125 11-126 11-127 11-128 11-129 11-130 11-131 11-132 11-133 11-134 11-135 11-136 11-137 11-138 11-139 11-140 11-141 11-142 11-143 11-144 11-145 11-146 11-147 11-148 11-149 11-150 11-151 11-152 11-153 11-154 11-155 11-156 11-157 11-158PHP message: 12-0 12-1 12-2 12-3 12-4 12-5 12-6 12-7 12-8 12-9 12-10 12-11 12-12 12-13 12-14 12-15 12-16 12-17 12-18 12-19 12-20 12-21 12-22 12-23 12-24 12-25 12-26 12-27 12-28 12-29 12-30 12-31 12-32 12-33 12-34 12-35 12-36 12-37 12-38 12-39 12-40 12-41 12-42 12-43 12-44 12-45 12-46 12-47 12-48 12-49 12-50 12-51 12-52 12-53 12-54 12-55 12-56 12-57 12-58 12-59 12-60 12-61 12-62 12-63 12-64 12-65 12-66 12-67 12-68 12-69 12-70 12-71 12-72 12-73 12-74 12-75 12-76 12-77 12-78 12-79 12-80 12-81 12-82 12-83 12-84 12-85 12-86 12-87 12-88 12-89 12-90 12-91 12-92 12-93 12-94 12-95 12-96 12-97 12-98 12-99 12-100 12-101 12-102 12-103 12-104 12-105 12-106 12-107 12-108 12-109 12-110 12-111 12-112 12-113 12-114 12-115 12-116 12-117 12-118 12-119 12-120 12-121 12-122 12-123 12-124 12-125 12-126 12-127 12-128 12-129 12-130 12-131 12-132 12-133 12-134 12-135 12-136 12-137 12-138 12-139 12-140 12-141 12-142 12-143 12-144 12-145 12-146 12-147 12-148 12-149 12-150 12-151 12-152 12-153 12-154 12-155 12-156 12-157 12-158PHP message: 13-0 13-1 13-2 13-3 13-4 13-5 13-6 13-7 13-8 13-9 13-10 13-11 13-12 13-13 13-14 13-15 13-16 13-17 13-18 13-19 13-20 13-21 13-22 13-23 13-24 13-25 13-26 13-27 13-28 13-29 13-30 13-31 13-32 13-33 13-34 13-35 13-36 13-37 13-38 13-39 13-40 13-41 13-42 13-43 13-44 13-45 13-46 13-47 13-48 13-49 13-50 13-51 13-52 13-53 13-54 13-55 13-56 13-57 13-58 13-59 13-60 13-61 13-62 13-63 13-64 13-65 13-66 13-67 13-68 13-69 13-70 13-71 13-72 13-73 13-74 13-75 13-76 13-77 13-78 13-79 13-80 13-81 13-82 13-83 13-84 13-85 13-86 13-87 13-88 13-89 13-90 13-91 13-92 13-93 13-94 13-95 13-96 13-97 13-98 13-99 13-100 13-101 13-102 13-103 13-104 13-105 13-106 13-107 13-108 13-109 13-110 13-111 13-112 13-113 13-114 13-115 13-116 13-117 13-118 13-119 13-120 13-121 13-122 13-123 13-124 13-125 13-126 13-127 13-128 13-129 13-130 13-131 13-132 13-133 13-134 13-135 13-136 13-137 13-138 13-139 13-140 13-141 13-142 13-143 13-144 13-145 13-146 13-147 13-148 13-149 13-150 13-151 13-152 13-153 13-154 13-155 13-156 13-157 13-158PHP message: 14-0 14-1 14-2 14-3 14-4 14-5 14-6 14-7 14-8 14-9 14-10 14-11 14-12 14-13 14-14 14-15 14-16 14-17 14-18 14-19 14-20 14-21 14-22 14-23 14-24 14-25 14-26 14-27 14-28 14-29 14-30 14-31 14-32 14-33 14-34 14-35 14-36 14-37 14-38 14-39 14-40 14-41 14-42 14-43 14-44 14-45 14-46 14-47 14-48 14-49 14-50 14-51 14-52 14-53 14-54 14-55 14-56 14-57 14-58 14-59 14-60 14-61 14-62 14-63 14-64 14-65 14-66 14-67 14-68 14-69 14-70 14-71 14-72 14-73 14-74 14-75 14-76 14-77 14-78 14-79 14-80 14-81 14-82 14-83 14-84 14-85 14-86 14-87 14-88 14-89 14-90 14-91 14-92 14-93 14-94 14-95 14-96 14-97 14-98 14-99 14-100 14-101 14-102 14-103 14-104 14-105 14-106 14-107 14-108 14-109 14-110 14-111 14-112 14-113 14-114 14-115 14-116 14-117 14-118 14-119 14-120 14-121 14-122 14-123 14-124 14-125 14-126 14-127 14-128 14-129 14-130 14-131 14-132 14-133 14-134 14-135 14-136 14-137 14-138 14-139 14-140 14-141 14-142 14-143 14-144 14-145 14-146 14-147 14-148 14-149 14-150 14-151 14-152 14-153 14-154 14-155 14-156 14-157 14-158PHP message: 15-0 15-1 15-2 15-3 15-4 15-5 15-6 15-7 15-8 15-9 15-10 15-11 15-12 15-13 15-14 15-15 15-16 15-17 15-18 15-19 15-20 15-21 15-22 15-23 15-24 15-25 15-26 15-27 15-28 15-29 15-30 15-31 15-32 15-33 15-34 15-35 15-36 15-37 15-38 15-39 15-40 15-41 15-42 15-43 15-44 15-45 15-46 15-47 15-48 15-49 15-50 15-51 15-52 15-53 15-54 15-55 15-56 15-57 15-58 15-59 15-60 15-61 15-62 15-63 15-64 15-65 15-66 15-67 15-68 15-69 15-70 15-71 15-72 15-73 15-74 15-75 15-76 15-77 15-78 15-79 15-80 15-81 15-82 15-83 15-84 15-85 15-86 15-87 15-88 15-89 15-90 15-91 15-92 15-93 15-94 15-95 15-96 15-97 15-98 15-99 15-100 15-101 15-102 15-103 15-104 15-105 15-106 15-107 15-108 15-109 15-110 15-111 15-112 15-113 15-114 15-115 15-116 15-117 15-118 15-119 15-120 15-121 15-122 15-123 15-124 15-125 15-126 15-127 15-128 15-129 15-130 15-131 15-132 15-133 15-134 15-135 15-136 15-137 15-138 15-139 15-140 15-141 15-142 15-143 15-144 15-145 15-146 15-147 15-148 15-149 15-150 15-151 15-152 15-153 15-154 15-155 15-156 15-157 15-158PHP message: 16-0 16-1 16-2 16-3 16-4 16-5 16-6 16-7 16-8 16-9 16-10 16-11 16-12 16-13 16-14 16-15 16-16 16-17 16-18 16-19 16-20 16-21 16-22 16-23 16-24 16-25 16-26 16-27 16-28 16-29 16-30 16-31 16-32 16-33 16-34 16-35 16-36 16-37 16-38 16-39 16-40 16-41 16-42 16-43 16-44 16-45 16-46 16-47 16-48 16-49 16-50 16-51 16-52 16-53 16-54 16-55 16-56 16-57 16-58 16-59 16-60 16-61 16-62 16-63 16-64 16-65 16-66 16-67 16-68 16-69 16-70 16-71 16-72 16-73 16-74 16-75 16-76 16-77 16-78 16-79 16-80 16-81 16-82 16-83 16-84 16-85 16-86 16-87 16-88 16-89 16-90 16-91 16-92 16-93 16-94 16-95 16-96 16-97 16-98 16-99 16-100 16-101 16-102 16-103 16-104 16-105 16-106 16-107 16-108 16-109 16-110 16-111 16-112 16-113 16-114 16-115 16-116 16-117 16-118 16-119 16-120 16-121 16-122 16-123 16-124 16-125 16-126 16-127 16-128 16-129 16-130 16-131 16-132 16-133 16-134 16-135 16-136 16-137 16-138 16-139 16-140 16-141 16-142 16-143 16-144 16-145 16-146 16-147 16-148 16-149 16-150 16-151 16-152 16-153 16-154 16-155 16-156 16-157 16-158PHP message: 17-0 17-1 17-2 17-3 17-4 17-5 17-6 17-7 17-8 17-9 17-10 17-11 17-12 17-13 17-14 17-15 17-16 17-17 17-18 17-19 17-20 17-21 17-22 17-23 17-24 17-25 17-26 17-27 17-28 17-29 17-30 17-31 17-32 17-33 17-34 17-35 17-36 17-37 17-38 17-39 17-40 17-41 17-42 17-43 17-44 17-45 17-46 17-47 17-48 17-49 17-50 17-51 17-52 17-53 17-54 17-55 17-56 17-57 17-58 17-59 17-60 17-61 17-62 17-63 17-64 17-65 17-66 17-67 17-68 17-69 17-70 17-71 17-72 17-73 17-74 17-75 17-76 17-77 17-78 17-79 17-80 17-81 17-82 17-83 17-84 17-85 17-86 17-87 17-88 17-89 17-90 17-91 17-92 17-93 17-94 17-95 17-96 17-97 17-98 17-99 17-100 17-101 17-102 17-103 17-104 17-105 17-106 17-107 17-108 17-109 17-110 17-111 17-112 17-113 17-114 17-115 17-116 17-117 17-118 17-119 17-120 17-121 17-122 17-123 17-124 17-125 17-126 17-127 17-128 17-129 17-130 17-131 17-132 17-133 17-134 17-135 17-136 17-137 17-138 17-139 17-140 17-141 17-142 17-143 17-144 17-145 17-146 17-147 17-148 17-149 17-150 17-151 17-152 17-153 17-154 17-155 17-156
[2022-09-06 18:58:14.740549] [R:y/4lGs2gyxk] [proxy_fcgi:error] AH01071: Got error '18-7 18-8 18-9 18-10 18-11 18-12 18-13 18-14 18-15 18-16 18-17 18-18 18-19 18-20 18-21 18-22 18-23 18-24 18-25 18-26 18-27 18-28 18-29 18-30 18-31 18-32 18-33 18-34 18-35 18-36 18-37 18-38 18-39 18-40 18-41 18-42 18-43 18-44 18-45 18-46 18-47 18-48 18-49 18-50 18-51 18-52 18-53 18-54 18-55 18-56 18-57 18-58 18-59 18-60 18-61 18-62 18-63 18-64 18-65 18-66 18-67 18-68 18-69 18-70 18-71 18-72 18-73 18-74 18-75 18-76 18-77 18-78 18-79 18-80 18-81 18-82 18-83 18-84 18-85 18-86 18-87 18-88 18-89 18-90 18-91 18-92 18-93 18-94 18-95 18-96 18-97 18-98 18-99 18-100 18-101 18-102 18-103 18-104 18-105 18-106 18-107 18-108 18-109 18-110 18-111 18-112 18-113 18-114 18-115 18-116 18-117 18-118 18-119 18-120 18-121 18-122 18-123 18-124 18-125 18-126 18-127 18-128 18-129 18-130 18-131 18-132 18-133 18-134 18-135 18-136 18-137 18-138 18-139 18-140 18-141 18-142 18-143 18-144 18-145 18-146 18-147 18-148 18-149 18-150 18-151 18-152 18-153 18-154 18-155 18-156 18-157 18-158PHP message: 19-0 19-1 19-2 19-3 19-4 19-5 19-6 19-7 19-8 19-9 19-10 19-11 19-12 19-13 19-14 19-15 19-16 19-17 19-18 19-19 19-20 19-21 19-22 19-23 19-24 19-25 19-26 19-27 19-28 19-29 19-30 19-31 19-32 19-33 19-34 19-35 19-36 19-37 19-38 19-39 19-40 19-41 19-42 19-43 19-44 19-45 19-46 19-47 19-48 19-49 19-50 19-51 19-52 19-53 19-54 19-55 19-56 19-57 19-58 19-59 19-60 19-61 19-62 19-63 19-64 19-65 19-66 19-67 19-68 19-69 19-70 19-71 19-72 19-73 19-74 19-75 19-76 19-77 19-78 19-79 19-80 19-81 19-82 19-83 19-84 19-85 19-86 19-87 19-88 19-89 19-90 19-91 19-92 19-93 19-94 19-95 19-96 19-97 19-98 19-99 19-100 19-101 19-102 19-103 19-104 19-105 19-106 19-107 19-108 19-109 19-110 19-111 19-112 19-113 19-114 19-115 19-116 19-117 19-118 19-119 19-120 19-121 19-122 19-123 19-124 19-125 19-126 19-127 19-128 19-129 19-130 19-131 19-132 19-133 19-134 19-135 19-136 19-137 19-138 19-139 19-140 19-141 19-142 19-143 19-144 19-145 19-146 19-147 19-148 19-149 19-150 19-151 19-152 19-153 19-154 19-155 19-156 19-157 19-158'

正如你所注意到的:17-157 17-158在 error_log 调用中缺少,18-0 18-1 18-2 18-3 18-4 18-5 18-6在以下 error_log 调用中也缺少

问题:有没有办法让 apache 不丢失这些字符串?我是否必须更改 apache 配置?

答案1

目前没有 php 配置参数可以改变这个限制。

相关内容