![Apache 서버 로그에서 '[정보] 서버가 바쁜 것 같습니다'를 해결하는 방법은 무엇입니까?](https://rvso.com/image/658839/Apache%20%EC%84%9C%EB%B2%84%20%EB%A1%9C%EA%B7%B8%EC%97%90%EC%84%9C%20'%5B%EC%A0%95%EB%B3%B4%5D%20%EC%84%9C%EB%B2%84%EA%B0%80%20%EB%B0%94%EC%81%9C%20%EA%B2%83%20%EA%B0%99%EC%8A%B5%EB%8B%88%EB%8B%A4'%EB%A5%BC%20%ED%95%B4%EA%B2%B0%ED%95%98%EB%8A%94%20%EB%B0%A9%EB%B2%95%EC%9D%80%20%EB%AC%B4%EC%97%87%EC%9E%85%EB%8B%88%EA%B9%8C%3F.png)
나는 이 질문을 몇 번 보았지만 실제 답변은 없었습니다. 그래서 나는 내 결심을 게시하기로 결정했습니다.
아래 info
메시지는 Apache error.log에서 볼 수 있습니다.
[info] server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 16 children, there are 41 idle, and 129 total children
답변1
해결책은 매우 분명한 것 같습니다. StartServers
사라질 때까지 늘리십시오 . 사실이지만, 의미를 이해하지 못하고 증가된 값이 실제로 도움이 될지 여부를 판단하지 않고 임의로 값을 늘리는 것은 나쁜 습관입니다.
httpd 소스 코드를 읽고 있었는데 다음과 같이 나와 있습니다.
/*
* idle_spawn_rate is the number of children that will be spawned on the
* next maintenance cycle if there aren't enough idle servers. It is
* doubled up to MAX_SPAWN_RATE, and reset only when a cycle goes by
* without the need to spawn.
*/
또한 소스에서 다음과 같은 경우 실제 오류가 기록됩니다.
if (retained->idle_spawn_rate >= 8) {
ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf, APLOGNO(00162)
"server seems busy, (you may need "
"to increase StartServers, or Min/MaxSpareServers), "
"spawning %d children, there are %d idle, and "
"%d total children", retained->idle_spawn_rate,
idle_count, total_non_dead);
}
이것이 의미하는 바는 다음과 같습니다. 이 오류가 발생합니다요청을 처리할 서버가 충분하지 않아 다음 주기에 생성될 자식 수가 8보다 큰 경우.
그럼 어떻게 고칠 수 있나요?
이 오류가 발생할 때마다 다음과 같은 내용이 표시됩니다 spawning 16 children
. 이는 요청을 처리할 서버가 부족하여 16명의 하위 항목을 생성해야 했음을 의미합니다. 기본적으로 StartServers
오류가 사라질 때까지 생성되는 자식의 양을 늘리십시오 . 대신 이 금액만큼 늘릴 수도 있습니다 Min/MaxSpareServers
.