精华内容
下载资源
问答
  • <div><p>… resource definitions. Added new parameter as optional value in the upstream_member/upstream_members templates.</p><p>该提问来源于开源项目:voxpupuli/puppet-nginx</p></div>
  • Upstream DNS

    2020-12-09 05:34:36
    Upstream DNS not working <p>Docker Run Command: docker run --name steamcache-dns -p 53:53/udp -e STEAMCACHE_IP=192.168.1.21 -e UPSTREAM_DNS=192.168.1.1 steamcache/steamcache-dns:latest <p>The ...
  • Upstream issue

    2020-12-09 14:26:25
    <div><p>Hello, I wondering if there is upstream plan for SiFive gcc branch? <a href="https://github.com/riscv/riscv-gcc">riscv gcc</a> is stale now. Most of which is upstreamed. However <code>riscv64...
  • Unexpected upstream response

    2020-11-27 14:17:53
    Checking the log file, there are only unexpected upstream response errors, nothing else. Prometheus queries still ok, restarting trickster fixes the problem. <pre><code> time=2020-03-20T05:14:12....
  • Fix upstream

    2020-12-28 02:35:58
    <div><p>This PR adapts AsciidoctorJ to the latest changes in Asciidoctor upstream. Besides changes to the converter registration, also the structure of DefinitionLists in the AST has changed. <p>This ...
  • <div><p>The current implementation of upstream recipient provider will not consider all upstream causes if a run has more than one upstream cause. In order to consider all causes I changed the ...
  • git upstream

    千次阅读 2020-01-09 23:11:15
    一个分支的upstream,其实就是与远程分支做关联,告诉git,默认此分支为推送及拉取的远程分支的信息。 upstream的设置 基本设置 1 $ git branch --set-upstream-to=origin/dev 或 ...

    一个分支的upstream,其实就是与远程分支做关联,告诉git,默认此分支为推送及拉取的远程分支的信息。

    upstream的设置

    基本设置

    1
    
    $ git branch --set-upstream-to=origin/dev
    

    1
    
    git branch -u origin/dev
    

     

    此命令的含义是,是指当前分支的upstream为origin远程仓库的dev分支。

    在推送的同时,同时设置upstream

    1
    
    $ git push -u origin master
    

    命令的含义是,推送master分支到远程origin仓库master分支,并且建立本地分支master的upstream为origin/master。(关于git push更详细的解释,请参考第04章)

    不切换分支直接设置其他分支的upstream

    1
    
    $ git br -u origin/br01-remote br01
    

    设置本地分支br01的upstream为origin/br01-remote。
    或push的时候直接设置。

    1
    
    $ git push -u origin br03:br03
    

     

    取消upstream

    取消当前分支的upstream

    1
    
    $ git branch --unset-upstream
    

    取消其他分支的upstream

    1
    
    $ git branch --unset-upstream [分支名]
    

    查看upstream

    查看upstream信息,主要是查看仓库目录下.git/config文件。

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    
    $ cat .git/config
    [core]
            repositoryformatversion = 0
            filemode = true
            bare = false
            logallrefupdates = true
    [remote "origin"]
            url = git@github0123:jeremy0123/fetch.git
            fetch = +refs/heads/*:refs/remotes/origin/*
    [branch "master"]
            remote = origin
            merge = refs/heads/master
    [branch "br01"]
            remote = origin
            merge = refs/heads/br01-remote
    [branch "br03"]
            remote = origin
            merge = refs/heads/br03
    

    其中[branch "分支名"]下的信息就是upstream信息,remote项表示upstream的远程仓库名,merge项表示远程跟踪分支名。
    另外,config中[remote "远程仓库名"]下的url和fetch需要注意下,这些信息可以和第02章的clone信息对应起来。

    也可以通过git remote show查看。

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    
    $ git remote show origin
    * remote origin
      Fetch URL: git@github0123:jeremy0123/fetch.git
      Push  URL: git@github0123:jeremy0123/fetch.git
      HEAD branch: master
      Remote branches:
        br01-remote tracked
        br03        tracked
        master      tracked
      Local branches configured for 'git pull':
        br01   merges with remote br01-remote
        br03   merges with remote br03
        master merges with remote master
      Local refs configured for 'git push':
        br03   pushes to br03   (up to date)
        master pushes to master (up to date)
    

    Remote branches表示远程仓库的分支,git pull表示upstream跟踪分支。

     

    展开全文
  • <div><p>Added methods to declare, delete and get the list of upstreams and upstream sets. Along with the ability to manage policies that should allow managing RabbitMQ federations.</p><p>该提问来源于...
  • Environment nginx/1.14.0 ... Process Nginx Error Log ...[error] 494#0: *134899320 upstream timed out (110: Connection timed out) while reading upstream, client: 217.137.190.200, server: www.si...

    Environment

    1. nginx/1.14.0
    2. PHP 7.1.17

    Process

    Nginx Error Log

    [error] 494#0: *134899320 upstream timed out (110: Connection timed out) while reading upstream, client: 217.137.190.200, server: www.sirius.com, request: "GET /admin/order?rows=1000&page=1&sort=id&sort_order=desc&good_id=&name=&transfer_no=&user_id=&start_date=&end_date=&status=HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "www.sirius.com", referrer: "http://www.sirius.com/admin"
    

    刚发现问题时,第一时间在网上查相关解决方法。大半是建议 nginx.conf 配置,如下。结果并不能解决问题。

    proxy_read_timeout 600s;
    

    再次检查报错时,发现 upstream: “fastcgi://127.0.0.1:9000”。这不就是 php-fpm 超时了嘛,那么解决办法自然是配置其参数,一是设置其超时参数,二是设置其文件缓存,将其参数值相应增大。

        # fastcgi php-fpm 部分配置
        fastcgi_connect_timeout 700;#fastcgi连接超时时间
        fastcgi_send_timeout 400;#fastcgi请求超时时间
        fastcgi_read_timeout 500;
        fastcgi_buffer_size 512k;#读取fastcgi应答需要多大缓冲区
        fastcgi_buffers 16 512k;#指定本地需要多少个和多大的缓冲区来缓冲fastcgi应答请
    求
        fastcgi_busy_buffers_size 1024k;#默认值是fastcgi_buffer的2倍
        fastcgi_temp_file_write_size 512k;#写入缓存文件使用多大的数据块
        fastcgi_cache_valid 200 301 302 600s;#指定缓存状态及失效时间
        fastcgi_intercept_errors on;
    
        proxy_read_timeout 600s;
    

    Conclusion

    Nginx开启日志很重要。

    转载本文,请注明出处、作者。

    展开全文
  • Support upstream branches

    2021-01-07 05:14:16
    - [x] Viewing which upstream branch is the upstream branch for the selected local branch (if there is one) - [x] Selecting an upstream for a branch - [x] Creating a new upstream branch (in memory)...
  • nginx upstream

    2016-09-27 15:46:10
    Nginx upstream

    http://tengine.taobao.org/book/index.html

    http://www.linuxidc.com/Linux/2015-03/115207.htm

    如果Nginx没有仅仅只能代理一台服务器的话,那它也不可能像今天这么火,Nginx可以配置代理多台服务器,当一台服务器宕机之后,仍能保持系统可用。具体配置过程如下:

    1. 在http节点下,添加upstream节点。

    upstream linuxidc {
    server 10.0.6.108:7080;
    server 10.0.0.85:8980;
    }

    1. 将server节点下的location节点中的proxy_pass配置为:http:// + upstream名称,即“
      http://linuxidc”.

    location / {
    root html;
    index index.html index.htm;
    proxy_pass http://linuxidc;
    }

    3.  现在负载均衡初步完成了。upstream按照轮询(默认)方式进行负载,每个请求按时间顺序逐一分配到不同的后端服务器,如果后端服务器down掉,能自动剔除。虽然这种方式简便、成本低廉。但缺点是:可靠性低和负载分配不均衡。适用于图片服务器集群和纯静态页面服务器集群。
    
    除此之外,upstream还有其它的分配策略,分别如下:
    
    weight(权重)
    
    指定轮询几率,weight和访问比率成正比,用于后端服务器性能不均的情况。如下所示,10.0.0.88的访问比率要比10.0.0.77的访问比率高一倍。
    

    upstream linuxidc{
    server 10.0.0.77 weight=5;
    server 10.0.0.88 weight=10;
    }

    如果权重一样,轮询的时候会随机分到一台server上

    展开全文
  • <div><p>support dynamic upstream with upstream is not variable <p>support proxy_pass command like that <pre><code> proxy_pass http://upstream_name; </code></pre> <p>it need modif nginx source code, ...
  • $upstream_name used in log_format <pre><code> server { .. set $upstream_name 'undef'; .. .. } location { .. log_by_lua_block { ngx.var.upstream_name = "test" local upstream &...
  • 2017/04/16 11:00:59 [error] 28461#28461: *2072 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 192.168.1.1, server: owncloud.example.com, request: &...
  • upstream sync 180607

    2020-12-30 22:52:30
    <div><p>This is the PR to hold upstream sync on 180607.</p><p>该提问来源于开源项目:ROCmSoftwarePlatform/tensorflow-upstream</p></div>
  • upstream sync 180613

    2020-12-26 14:05:23
    <div><p>Keep in sync with TensorFlow upstream up to 06/13/2018</p><p>该提问来源于开源项目:ROCmSoftwarePlatform/tensorflow-upstream</p></div>
  • Merge upstream changes

    2020-12-09 08:01:54
    <div><p>This merges upstream changes, the main change is switching away from glitch-soc's keyword mutes to upstream's custom filters. <p>This is done by using both systems in the merge commit,...
  • memc upstream statistics

    2020-12-09 09:54:53
    <div><p>Is it possible to collect upstream statistics for memc_pass? <p>I've created the following location for upstream, but nginx doesn't collect any statistics: <p>log_format main '$...
  • <p><code>upstream prematurely closed connection while reading response header from upstream</code></p> <p>This only happens when the amount of data that is requested is large.</p><p>该提问来源于开源...
  • upstream机制介绍 Nginx访问上游服务器主要是基于upstream机制。 upstream机制是事件驱动框架与HTTP框架的综合,它既属于HTTP框架的一部分,又可以处于基于TCP的应用层协议。为了帮助Nginx实现反向代理功能,...

    upstream机制介绍
           Nginx访问上游服务器主要是基于upstream机制。
    upstream机制是事件驱动框架与HTTP框架的综合,它既属于HTTP框架的一部分,又可以处于基于TCP的应用层协议。为了帮助Nginx实现反向代理功能,upstream机制处理提供基本的与上游交互的功能之外,还实现里转发上游应用层协议的响应包体到下游客户端的功能。
            Nginx访问上游服务器大致可以分为6个阶段:启动UPSREAM机制,连接上游服务器,向上游服务器发送请求,接收上游服务器的响应包头,处理接收都的响应包体,结束请求。
    1.启动upstrean机制
            启动方式很简单,创建并设置好请求体找那个的upstream成名,然后调用ngx_http_upstream_init就可以了。ngx_http_upstream_init主要就是检查下游读时间的timer_set位,如果定时器中有读事件,则将客户端连接的读事件从定时器移除。然后调用HTTP模块实现create_request方法,最后调用ngx_http_upstream_connect方法连接下游服务器。
    2.与上游服务器建立连接
           upstream机制与上游服务器是通过无阻塞的套接字来来建立TCP连接的。ngx_http_upstream_connect用来发起建立连接,如果这个方法没有立刻返回成功,那么需要在epoll中监控,当他出现可写事件时,表明连接建立成功。
    3.发送请求到上游服务器
           发送请求的方法需要被epoll调度许多次ngx_http_upstream_send_request才能发送完请求,
    4.接收上游服务器的响应头部
           当请求全部发送给上游服务器后,Nginx处于静默状态,ngx_http_upstream_process_header方法处理上游服务器的响应。
    6.结束请求
           响应处理完后,需要结束请求,upstream机制提供了一个类似的方法ngx_http_upstream_finalize_request用于结束upstream请求。

        upstream机制属于HTTP框架,请求组装,发送往上游,解析上游响应的部分都在HTTP模块。

    展开全文
  • Git upstream

    千次阅读 2018-09-17 18:36:14
    git remote add upstream 项目A的git地址 3.在本地新建一个分支,该分支的名称最好与项目A中新增的那个分支的名称相同以便区分 git checkout -b 新分支名称 4.从项目A中将新分支的内容 pull 到本地 git p...
  • nginx upstream fair算法

    2017-12-06 10:43:21
    nginx upstream fair算法 编译时加下面选项: --add-module=./nginx-upstream-fair make && make install
  • Nginx upstream变量

    千次阅读 2019-05-07 18:41:00
    87 log_format varups '$upstream_addr $upstream_connect_time $upstream_header_time $upstream_response_time ' '$upstream_response_length $upstream_bytes_received ' ...
  • Nginx upstream

    千次阅读 2018-06-26 16:05:26
    配置语法:upstream backend{ server backend1.example.com weight=5; weight 代表权重 server backend2.example.com:8080; server unix:/tmp/backend3; server backup1.example.com:8...
  • upstream
  • Install upstream not working

    2020-12-01 21:51:31
    <div><p>The upstream installs do not seem to work. This worked yesterday so not sure exactly what has happened. Any ideas would be greatly appreciated. <pre><code> iMac-Pro-2:emsdk Jimmy$ ./emsdk ...
  • This PR adds <code>connection.upstream_secure</code> attribute to indicate whether the upstream connection is secure (e.g. proxy->proxy for client-side). <p>/assign /assign -reid /assign ...
  • Nginx Upstream模块

    2019-10-02 14:39:52
    upstream模块 原文链接:http://nginx.org/en/docs/http/ngx_http_upstream_module.html upstream 定义一组Server去监听不同的端口 当然也可以监听TCP或者Unix主机Socket upstream backend { server backend1....
  • Develop upstream sync 180806

    2021-01-01 02:12:06
    <div><p>Weekly upstream merge.</p><p>该提问来源于开源项目:ROCmSoftwarePlatform/tensorflow-upstream</p></div>

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 42,032
精华内容 16,812
热门标签
关键字:

upstream