为什么nginx不将更改保存到AWS中的conf文件?

bakd9h0s  于 2024-01-06  发布在  Nginx
关注(0)|答案(1)|浏览(183)

我在我的弹性beanstalk web应用程序中得到504错误后60秒,所以我已经实现了超时扩展更改的配置文件/etc/nginx/nginx.conf,以及设置类型_哈希_最大_大小为1024根据错误日志。是否有任何其他错误日志,我应该检查我的AWS示例或我实现的更改不正确?
下面是我添加的nginx配置:

  1. #Elastic Beanstalk Nginx Configuration File
  2. user nginx;
  3. error_log /var/log/nginx/error.log warn;
  4. pid /var/run/nginx.pid;
  5. worker_processes auto;
  6. worker_rlimit_nofile 200000;
  7. events {
  8. worker_connections 1024;
  9. }
  10. http {
  11. server_tokens off;
  12. include /etc/nginx/mime.types;
  13. default_type application/octet-stream;
  14. log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  15. '$status $body_bytes_sent "$http_referer" '
  16. '"$http_user_agent" "$http_x_forwarded_for"';
  17. include conf.d/*.conf;
  18. map $http_upgrade $connection_upgrade {
  19. default "upgrade";
  20. }
  21. server {
  22. listen 80 default_server;
  23. access_log /var/log/nginx/access.log main;
  24. client_header_timeout 90;
  25. client_body_timeout 90;
  26. keepalive_timeout 90;
  27. proxy_connect_timeout 90;
  28. proxy_send_timeout 90;
  29. proxy_read_timeout 90;
  30. send_timeout 90;
  31. types_hash_max_size 1024;
  32. gzip off;
  33. gzip_comp_level 4;
  34. gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;
  35. # Include the Elastic Beanstalk generated locations
  36. include conf.d/elasticbeanstalk/*.conf;
  37. }
  38. }

字符串
这是日志中出现的错误

  1. [warn] 13416#13416: could not build optimal types_hash, you should increase either types_hash_max_size: 1024 or types_hash_bucket_size: 64; ignoring types_hash_bucket_size

hfwmuf9z

hfwmuf9z1#

基于你的错误,我会努力改变

  1. server {
  2. # More config...
  3. types_hash_max_size 4096; # Defaut value is 1024
  4. variables_hash_max_size 8192;
  5. # More config...
  6. }

字符串
试试看吧,晚了我知道你还是犯了错误。

相关问题