• Windows环境下Apache的reverse proxy报OS 10048的原因和解决办法


    apache服务器设置了反向代理后,运行一段时间就会莫名其妙的报后台服务器暂时无法连接的错误,过几秒钟后又能自动恢复,查看后发现apache的错误日志中有如下字样:
    [error] (OS 10048)Only one usage of each socket address (protocol/network address/port) is normally permitted.  : proxy: HTTP: attempt to connect to localhost:8080 (localhost) failed
    [error] ap_proxy_connect_backend disabling worker for (host name)
     
    此问题是由于windows环境下缺省的tcp的maxuserport为5000,而使用了反向代理则很可能很快耗尽了端口资源,一旦耗尽端口资源则产生os 10048错误,接着ap_proxy_connect_backend就自动重启所有的线程。
    解决办法是到注册表中建立一个maxuserport键以修改此参数的缺省值。以下是msdn上对于此参数的解释:
    MaxUserPort

    HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

    Data type

    Range

    Default value

    REG_DWORD

    5,000–65,534 ( port number )

    5000

    Description

    Determines the highest port number TCP can assign when an application requests an available user port from the system. Typically, ephemeral ports (those used briefly) are allocated to port numbers 1024 through 5000.

    Note Image Note

    Windows 2000 does not add this entry to the registry. You can add it by editing the registry or by using a program that edits the registry.

  • 相关阅读:
    [BTS] BizTalk host BizTalkServerApplication throttled because DatabaseSize exceeded the configured throttling limit.
    Linux sed 批量替换字符串方法
    MYSQL中的POSITION方法
    wc (Word Count)
    sudo
    关于数据库timestamp类型问题
    SQL中存储过程和自定义函数的区别
    数据库存储过程
    五 : springMVC拦截器
    四 : springMVC各种跳页面传值
  • 原文地址:https://www.cnblogs.com/relax/p/2214573.html
Copyright © 2020-2023  润新知