gpt4 book ai didi

amazon-web-services - 无法延长 AWS 中 beanstalk 的超时时间

转载 作者:行者123 更新时间:2023-12-04 19:31:20 25 4
gpt4 key购买 nike

我需要在 aws 中延长我的 beanstalk 的超时时间,我在负载均衡器中增加了超时时间,但我仍然面临 502 错误。所以我尝试在提供文件的 .ebextensions 文件夹中添加 httpd confing

# Managed by Elastic Beanstalk
PidFile run/httpd.pid

# Enable TCP keepclive
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 300

<IfModule worker.c>
StartServers 10
MinSpareThreads 250
MaxSpareThreads 250
ServerLimit 10
MaxClients 250
MaxRequestsPerChild 1000000
</IfModule>

Listen 80

Include conf.d/*.conf
Include conf.d/elasticbeanstalk/*.conf

User apache
Group apache

CustomLog logs/access_log "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\""
TraceEnable off

LoadModule alias_module modules/mod_alias.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule headers_module modules/mod_headers.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule cache_module modules/mod_cache.so

当我尝试在 beanstalk 上部署它时,我开始面临错误:

[Instance: i-0c436613676c84739] Command failed on instance. Return code: 1 Output: (TRUNCATED)...pd.conf AH00534: httpd: Configuration error: No MPM loaded. Failed to execute '/usr/sbin/apachectl -t -f /var/elasticbeanstalk/staging/httpd/conf/httpd.conf' Failed to execute '/usr/sbin/apachectl -t -f /var/elasticbeanstalk/staging/httpd/conf/httpd.conf'. Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/03_configure_proxy.sh failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.



我尝试在 httpd.conf 文件中添加 npm 模块,但这样做我面临其他问题并且它永远不会结束。
此文件是否需要进行任何更正?

最佳答案

无论出于何种原因,该 EC2/beanstalk 镜像缺少此文件:/etc/httpd/conf.modules.d/00-mpm.conf只需使用以下文本创建它:

# Select the MPM module which should be used by uncommenting exactly
# one of the following LoadModule lines.

# prefork MPM: Implements a non-threaded, pre-forking web server
# See: http://httpd.apache.org/docs/2.4/mod/prefork.html
#
# NOTE: If enabling prefork, the httpd_graceful_shutdown SELinux
# boolean should be enabled, to allow graceful stop/shutdown.
#
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so

# worker MPM: Multi-Processing Module implementing a hybrid
# multi-threaded multi-process web server
# See: http://httpd.apache.org/docs/2.4/mod/worker.html
#
#LoadModule mpm_worker_module modules/mod_mpm_worker.so

# event MPM: A variant of the worker MPM with the goal of consuming
# threads only for connections with active processing
# See: http://httpd.apache.org/docs/2.4/mod/event.html
#
#LoadModule mpm_event_module modules/mod_mpm_event.so
然后运行 ​​ sudo systemctl restart httpd

关于amazon-web-services - 无法延长 AWS 中 beanstalk 的超时时间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60725565/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com