Nginx警告could not build optimal types_hash, you should increase either types_hash_max_size: 2048解决方案

这篇具有很好参考价值的文章主要介绍了Nginx警告could not build optimal types_hash, you should increase either types_hash_max_size: 2048解决方案。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

现象

今天在服务器上新装了一个Nginx,做了相关配置之后,验证配置时,报警告如下:
为了方便阅读,给手动换行了。

[warn] 18872#18872: could not build optimal types_hash, 
you should increase either types_hash_max_size: 2048 or types_hash_bucket_size: 64;
ignoring types_hash_bucket_size

我哪见过这种场面呀,不过试了一下,虽然出现警告,但是Nginx启动没有问题。
但这个警告真的是碍眼,还是要解决掉。

解决方法

编辑Nginx配置文件,/etc/nginx/nginx.conf,修改types_hash_max_size的值。
我这里是直接把该值翻倍,原来是2048,设置为4096。
保存后,重新执行

nginx -t
#或者
nginx -s reload

警告消失。文章来源地址https://www.toymoban.com/news/detail-622820.html

到了这里,关于Nginx警告could not build optimal types_hash, you should increase either types_hash_max_size: 2048解决方案的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • 解决Build failed:Could not resolve com.android.tools.build:gradle:XXX

    先创建的项目在build时出现下面的报错: 原因:此为Android Studio默认的JDK版本与项目配置的Gradle所需的JDK不一致导致冲突所致。要求选择同一版本的JDK。 解决方案:点击File --Project Structure -SDK Location-JDK location gradle Settings,将Gradle user home和项目的Gradle JDK改为一样的版本目录。

    2024年02月11日
    浏览(39)
  • cryptography构建报错(Could not build wheels for cryptography)

    一个经常开发的python项目,在今天打包镜像的时候突然报错,报错内容如下: 使用“Could not build wheels for cryptography, which is required to install pyproject.toml-based projects”去网络上搜集解决方法,都没有解决。接着,尝试重新初始化项目环境后重新打包镜像,还是报一样的错误。 很

    2023年04月08日
    浏览(42)
  • 已解决org.apache.ibatis.type.TypeException: Could not resolve type alias

    已解决org.apache.ibatis.type.TypeException: Could not resolve type alias org.apache.ibatis.type.TypeException: Could not resolve type alias 对于 org.apache.ibatis.type.TypeException: Could not resolve type alias 错误,通常是由于 MyBatis 配置文件中配置的别名无法解析导致的。 下滑查看解决方法 解决方法如下: 首先,请

    2024年02月06日
    浏览(40)
  • Could not resolve com.android.tools.build:gradle:7.4.2.

    Android Studio 新建工程时报错 Could not resolve com.android.tools.build:gradle:7.4.2. 原因: Android Studio默认的JDK版本与项目配置的Gradle所需的JDK不一致导致冲突所致 解决方法:进入Preferences-Build,Execution,Deployment-Build Tools-Gradle中,将Gradle user home和项目的Gradle JDK改为一样的版本目录

    2024年02月11日
    浏览(36)
  • Nginx modules build fail:field ‘pkt6’ has incomplete type

    最近升级Nginx 1.24.0,编译第三方module出错: 从这个可以看出, 是定义不匹配,查了一下资料: https://trac.nginx.org/nginx/ticket/2312 同时,看了一下第三方module的源码,发现第三方module源码,不是以nginx规则开头的: Development guide 所以修改文件include头顺序, 搞定

    2024年02月02日
    浏览(25)
  • python库安装:Could not build wheels for opencv-python

    完整指令如下: pip install opencv-python -i https://pypi.tuna.tsinghua.edu.cn/simple opencv-python==4.3.0.38

    2024年02月15日
    浏览(37)
  • 解决 Could not resolve com.android.tools.build:gradle:7.4.1

    今天新建了一个工程,报了如下错误 A problem occurred configuring root project \\\'My Application\\\'. Could not resolve all files for configuration \\\':classpath\\\'.    Could not resolve com.android.tools.build:gradle:7.4.1.      Required by:          project : com.android.application:com.android.application.gradle.plugin:7.4.1       

    2024年02月02日
    浏览(35)
  • Could not autowire. No beans of ‘DiscoveryClient‘ type found.

    一、导错了包 DiscoveryClient对应有两个包: org.springframework.cloud.client.discovery.DiscoveryClient; com.netflix.discovery.DiscoveryClient; 目前导入的包是: 改成第一个包,发现不再报红了。

    2024年02月11日
    浏览(34)
  • 解决Flutter运行报错Could not run build/ios/iphoneos/Runner.app

    更新了IOS的系统版本为最新的17.0, 运行报以下错误 在网上上到一种方法 试一下发现不是一样的问题。 最后在stackoverflow上找到解决办法=链接地址 根本原因是IOS17和Xcode的配置变化引起的,需要更新Flutter的SDK版本到3.13以上就可以解决。 在命令行中使用 flutter upgrade 来更新Flu

    2024年02月02日
    浏览(52)
  • 报错:Failed to build tokenizers / # ERROR: Could not build wheels for tokenizers, which is required to

    在安装tokenizers出现报错: 然后去网上找各种解决方法,参考链接:ERROR: 原文作者原先是使用miniconda进行安装的时候报错的,但是换用conda以后就成功了,有条件的可以试试。 尝试了其中第一个方法:对pip以及wheel进行更新, pip install --upgrade pip setuptools wheel 很多人评价可以实

    2024年02月16日
    浏览(60)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包