请教一下,有人知道 docker 转发的端口时好时坏的咋回事么? - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
zktz

请教一下,有人知道 docker 转发的端口时好时坏的咋回事么?

  •  
  •   zktz Apr 26, 2019 5360 views
    This topic created in 2560 days ago, the information mentioned may be changed or developed.
    # curl http://10.2.176.14:30980/h5/intro curl: (7) Failed connect to 10.2.176.14:30980; 连接超时 # curl http://10.2.176.14:30980/h5/intro <!DOCTYPE html> <html lang="zh-cn"> <head> <meta charset="UTF-8"> <meta name="viewport" cOntent="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" /> <meta name="format-detection" cOntent="telephOne=no"> 

    虽然是偶发现象,但是本身访问量就不大,所以出现的概率还挺高的。 docker 容器内是一个 nginx+tomcat。 观察了 1 天了,不知道啥毛病。 ipv4 的 tcp 的连接参数已经改了。

    /etc/sysctl.conf

    net.ipv4.ip_local_port_range = 1024 65535 net.core.rmem_max=16777216 net.core.wmem_max=16777216 net.ipv4.tcp_rmem=4096 87380 16777216 net.ipv4.tcp_wmem=4096 65536 16777216 net.ipv4.tcp_fin_timeout = 10 net.ipv4.tcp_tw_recycle = 1 net.ipv4.tcp_timestamps = 1 net.ipv4.tcp_window_scaling = 0 net.ipv4.tcp_sack = 0 net.core.netdev_max_backlog = 30000 net.ipv4.tcp_no_metrics_save=1 net.core.somaxcOnn= 26214 net.ipv4.tcp_syncookies = 0 net.ipv4.tcp_max_orphans = 262144 net.ipv4.tcp_max_syn_backlog = 262144 net.ipv4.tcp_synack_retries = 2 net.ipv4.tcp_syn_retries = 2 vm.overcommit_memory = 1 
    4 replies    2019-05-14 15:20:25 +08:00
    julyclyde
        1
    julyclyde  
       Apr 26, 2019
    那如果没用 docker、甚至没用 nginx,同样的 tomcat 会怎样呢?
    kingfsen
        2
    kingfsen  
       Apr 26, 2019
    docker-proxy 代理进程处理太慢?
    还是 docker 容器内部应用处理能力不行?
    服务器资源不足?
    zktz
        3
    zktz  
    OP
       Apr 28, 2019
    从容器内部来看,响应不慢啊。
    kkxxxxxxx
        4
    kkxxxxxxx  
       May 14, 2019
    上次碰到这种情况是在这个镜像上 nimmis/alpine-apache-php5,至今也没搞懂
    About     Help     Advertise     Blog     API     FAQ     Solana     2977 Online   Highest 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 34ms UTC 15:01 PVG 23:01 LAX 08:01 JFK 11:01
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86