Necesito extender el tiempo de espera para mi beanstalk en aws, aumenté el tiempo de espera en el balanceador de carga pero todavía me encuentro con el error 502. Así que traté de agregar httpd confing en la carpeta .ebextensions a continuación, se proporciona el archivo
# 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.soCuando intento implementar esto en beanstalk, comencé a encontrar un error:
[Instancia: i-0c436613676c84739] El comando falló en la instancia. Código de retorno: 1 Salida: (TRUNCADO)...pd.conf AH00534: httpd: Error de configuración: No MPM cargado. Error al ejecutar '/usr/sbin/apachectl -t -f /var/elasticbeanstalk/staging/httpd/conf/httpd.conf' Error al ejecutar '/usr/sbin/apachectl -t -f /var/elasticbeanstalk/staging/ httpd/conf/httpd.conf'. El enlace /opt/elasticbeanstalk/hooks/appdeploy/pre/03_configure_proxy.sh falló. Para obtener más detalles, consulte /var/log/eb-activity.log mediante la consola o la CLI de EB.
Traté de agregar el módulo npm en el archivo httpd.conf, pero al hacerlo, me enfrento a otro problema y nunca termina. ¿Hay alguna corrección necesaria para hacer en este archivo?
Por alguna razón, a esa imagen de EC2/beanstalk le falta este archivo:
/etc/httpd/conf.modules.d/00-mpm.conf
Simplemente créalo con el siguiente texto:
# 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 luego ejecuta sudo systemctl restart httpd