You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by GitBox <gi...@apache.org> on 2021/02/27 03:19:46 UTC

[GitHub] [incubator-brpc] lifeiyang opened a new issue #1346: brpc 作为client 访问grpc server 返回Err=[E2004] remote_window_left is not enough

lifeiyang opened a new issue #1346:
URL: https://github.com/apache/incubator-brpc/issues/1346


   **Describe the bug (描述bug)**
   brpc 作为client 访问grpc server 第一次请求包大小大概50KB左右,能够正常返回,第二次发送同样大小的包,则会返回错误, 出现 Err=[E2004]remote_window_left is not enough , 我看之前有个关于remote_window_left is not enough的bug fix https://github.com/apache/incubator-brpc/pull/849 是关于首次发送大包请求的问题,我目前用的brpc版本是0.9.7,已经包含了这个fix, 而且首次发送几MB的大包都没问题,但是第二次发送同样的包就会出现这个错误,麻烦各位大佬,指出问题所在,谢谢
   **To Reproduce (复现方法)**
   brpc作为client第一次访问grpc server的包大小为50KB左右,第二次同样的请求会出现Err=[E2004]remote_window_left is not enough
   
   **Expected behavior (期望行为)**
   每次client端发送的大包请求都能够被正确处理
   
   **Versions (各种版本)**
   OS: centos 7.3
   Compiler: gcc 7.3
   brpc: 0.9.7
   protobuf: protobuf 2.6
   
   **Additional context/screenshots (更多上下文/截图)**
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] lifeiyang edited a comment on issue #1346: brpc 作为client 访问grpc server 返回Err=[E2004] remote_window_left is not enough

Posted by GitBox <gi...@apache.org>.
lifeiyang edited a comment on issue #1346:
URL: https://github.com/apache/incubator-brpc/issues/1346#issuecomment-787066076


   > 尝试一下把brpc client的window_size调大,具体是这两个参数
   > 
   > * https://github.com/apache/incubator-brpc/blob/master/src/brpc/policy/http2_rpc_protocol.cpp#L37
   > * https://github.com/apache/incubator-brpc/blob/master/src/brpc/policy/http2_rpc_protocol.cpp#L39
   @zyearn 
   参数调整如下:
   ![image](https://user-images.githubusercontent.com/3754939/109387182-d4c9ef80-793a-11eb-940d-7a0429e69497.png)
   
   但是调大之后,依然没有效果,错误信息还是如下:
   Err=[E2004]remote_window_left is not enough, data_size=51208
   
   
   
   通过brpc的 ip:port/sockets/agent_server_id 查看的信息如下:
   红色标注框上面为remote_setting, 下面为local_setting
   ![image](https://user-images.githubusercontent.com/3754939/109387691-dea12200-793d-11eb-9469-c37b0a2f7318.png)
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] lifeiyang removed a comment on issue #1346: brpc 作为client 访问grpc server 返回Err=[E2004] remote_window_left is not enough

Posted by GitBox <gi...@apache.org>.
lifeiyang removed a comment on issue #1346:
URL: https://github.com/apache/incubator-brpc/issues/1346#issuecomment-787597899


   > 找一下grpc server的h2 window_size的配置,然后把这个值调大就可以了。你的场景应该是client向grpc server发大包,默认情况下server端这个窗口是很小的(64K),需要手动调大。
   
   brpc 这边可以关闭流控吗?如何关闭?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] lifeiyang commented on issue #1346: brpc 作为client 访问grpc server 返回Err=[E2004] remote_window_left is not enough

Posted by GitBox <gi...@apache.org>.
lifeiyang commented on issue #1346:
URL: https://github.com/apache/incubator-brpc/issues/1346#issuecomment-789618396


   > 是因为_remote_window_left的初始值是MAX_WINDOW_SIZE,这个fetch_sub是把初始值恢复到DEFAULT_INITIAL_WINDOW_SIZE。
   > 
   > 改完grpc server的配置后再看看你之前贴图里面的H2Context { remote_setting =...} 有没有生效,否则再检查一下有没有正确设置,用grpc-go的话,需要设置两个变量。
   
   server端使用的是grpc-c, 那边通过常量修改stream_window_size为1GB,观察remote_window_left值,还是只有几十KB, 如下图所示:
   
   下一步调整哪些参数或者逻辑能让remote_window_left继续增大呢?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] lifeiyang edited a comment on issue #1346: brpc 作为client 访问grpc server 返回Err=[E2004] remote_window_left is not enough

Posted by GitBox <gi...@apache.org>.
lifeiyang edited a comment on issue #1346:
URL: https://github.com/apache/incubator-brpc/issues/1346#issuecomment-791180912


   grpc-c 里面没有提供对外的接口和配置能够手动修改h2 的connection_window_size, 它是通过BDP(bandwith delay production)来自动调节流控窗口的(包括stream_window_size和conn_window_size),我们通过比对发现grpc服务端启动的时候通过配置项: builder.AddChannelArgument(GRPC_ARG_HTTP2_BDP_PROBE, 0);  关闭了BDP;  这样server端就没法根据客户端发送的数据包大小,自动调节流控窗口大小,最终导致brpc 客户端无法持续发送大的数据包, 也就是说brpc client 和grpc server 端都保持默认的流控策略是没有任何问题的,感谢@zyearn的问题分析。
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] lifeiyang commented on issue #1346: brpc 作为client 访问grpc server 返回Err=[E2004] remote_window_left is not enough

Posted by GitBox <gi...@apache.org>.
lifeiyang commented on issue #1346:
URL: https://github.com/apache/incubator-brpc/issues/1346#issuecomment-787066076


   > 尝试一下把brpc client的window_size调大,具体是这两个参数
   > 
   > * https://github.com/apache/incubator-brpc/blob/master/src/brpc/policy/http2_rpc_protocol.cpp#L37
   > * https://github.com/apache/incubator-brpc/blob/master/src/brpc/policy/http2_rpc_protocol.cpp#L39
   
   参数调整如下:
   ![image](https://user-images.githubusercontent.com/3754939/109387182-d4c9ef80-793a-11eb-940d-7a0429e69497.png)
   
   但是调大之后,依然没有效果,错误信息还是如下:
   Err=[E2004]remote_window_left is not enough, data_size=51208
   
   
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] lifeiyang edited a comment on issue #1346: brpc 作为client 访问grpc server 返回Err=[E2004] remote_window_left is not enough

Posted by GitBox <gi...@apache.org>.
lifeiyang edited a comment on issue #1346:
URL: https://github.com/apache/incubator-brpc/issues/1346#issuecomment-789618396


   > 是因为_remote_window_left的初始值是MAX_WINDOW_SIZE,这个fetch_sub是把初始值恢复到DEFAULT_INITIAL_WINDOW_SIZE。
   > 
   > 改完grpc server的配置后再看看你之前贴图里面的H2Context { remote_setting =...} 有没有生效,否则再检查一下有没有正确设置,用grpc-go的话,需要设置两个变量。
   
   server端使用的是grpc-c, 那边通过常量修改stream_window_size为1GB,观察remote_window_left值,还是只有几十KB, 如下图所示:
   ![image](https://user-images.githubusercontent.com/3754939/109794193-93925200-7c50-11eb-8258-37e6285cf9e6.png)
   
   下一步调整哪些参数或者逻辑能让remote_window_left继续增大以便于发送大数据量的包呢?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] zyearn commented on issue #1346: brpc 作为client 访问grpc server 返回Err=[E2004] remote_window_left is not enough

Posted by GitBox <gi...@apache.org>.
zyearn commented on issue #1346:
URL: https://github.com/apache/incubator-brpc/issues/1346#issuecomment-790006745


   因为server端没有设置connection层面的window_size,在brpc里对应的是H2Settings:: connection_window_size,你要找找grpc-c对应设置的地方。设置完后,h2初始化的时候server会向client发一个H2_FRAME_WINDOW_UPDATE包,可以抓包看看有没有。


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] lifeiyang commented on issue #1346: brpc 作为client 访问grpc server 返回Err=[E2004] remote_window_left is not enough

Posted by GitBox <gi...@apache.org>.
lifeiyang commented on issue #1346:
URL: https://github.com/apache/incubator-brpc/issues/1346#issuecomment-786995184


   > **Describe the bug (描述bug)**
   > brpc 作为client 访问grpc server 第一次请求包大小大概50KB左右,能够正常返回,第二次发送同样大小的包,则会返回错误, 出现 Err=[E2004]remote_window_left is not enough , 我看之前有个关于remote_window_left is not enough的bug fix #849 是关于首次发送大包请求的问题,我目前用的brpc版本是0.9.7,已经包含了这个fix, 而且首次发送几MB的大包都没问题,但是第二次发送同样的包就会出现这个错误,麻烦各位大佬,指出问题所在,谢谢
   > **To Reproduce (复现方法)**
   > brpc作为client第一次访问grpc server的包大小为50KB左右,第二次同样的请求会出现Err=[E2004]remote_window_left is not enough
   > 
   > **Expected behavior (期望行为)**
   > 每次client端发送的大包请求都能够被正确处理
   > 
   > **Versions (各种版本)**
   > OS: centos 7.3
   > Compiler: gcc 7.3
   > brpc: 0.9.7
   > protobuf: protobuf 2.6
   > 
   > **Additional context/screenshots (更多上下文/截图)**
   
   @jamesge 麻烦作者关注一下问题,看看到底是使用问题还是框架本身的问题,谢谢


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] lifeiyang edited a comment on issue #1346: brpc 作为client 访问grpc server 返回Err=[E2004] remote_window_left is not enough

Posted by GitBox <gi...@apache.org>.
lifeiyang edited a comment on issue #1346:
URL: https://github.com/apache/incubator-brpc/issues/1346#issuecomment-789618396


   > 是因为_remote_window_left的初始值是MAX_WINDOW_SIZE,这个fetch_sub是把初始值恢复到DEFAULT_INITIAL_WINDOW_SIZE。
   > 
   > 改完grpc server的配置后再看看你之前贴图里面的H2Context { remote_setting =...} 有没有生效,否则再检查一下有没有正确设置,用grpc-go的话,需要设置两个变量。
   
   server端使用的是grpc-c, 那边通过常量修改stream_window_size为1GB,观察remote_window_left值,还是只有几十KB, 如下图所示:
   ![image](https://user-images.githubusercontent.com/3754939/109794193-93925200-7c50-11eb-8258-37e6285cf9e6.png)
   
   下一步调整哪些参数或者逻辑能让remote_window_left继续增大呢?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] zyearn commented on issue #1346: brpc 作为client 访问grpc server 返回Err=[E2004] remote_window_left is not enough

Posted by GitBox <gi...@apache.org>.
zyearn commented on issue #1346:
URL: https://github.com/apache/incubator-brpc/issues/1346#issuecomment-787038785


   尝试一下把brpc client的window_size调大,具体是这两个参数
   * https://github.com/apache/incubator-brpc/blob/master/src/brpc/policy/http2_rpc_protocol.cpp#L37
   * https://github.com/apache/incubator-brpc/blob/master/src/brpc/policy/http2_rpc_protocol.cpp#L39


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] lifeiyang edited a comment on issue #1346: brpc 作为client 访问grpc server 返回Err=[E2004] remote_window_left is not enough

Posted by GitBox <gi...@apache.org>.
lifeiyang edited a comment on issue #1346:
URL: https://github.com/apache/incubator-brpc/issues/1346#issuecomment-787066076


   > 尝试一下把brpc client的window_size调大,具体是这两个参数
   > 
   > * https://github.com/apache/incubator-brpc/blob/master/src/brpc/policy/http2_rpc_protocol.cpp#L37
   > * https://github.com/apache/incubator-brpc/blob/master/src/brpc/policy/http2_rpc_protocol.cpp#L39
   @zyearn 
   参数调整如下:
   ![image](https://user-images.githubusercontent.com/3754939/109387182-d4c9ef80-793a-11eb-940d-7a0429e69497.png)
   
   但是调大之后,依然没有效果,错误信息还是如下:
   Err=[E2004]remote_window_left is not enough, data_size=51208
   
   
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] zyearn edited a comment on issue #1346: brpc 作为client 访问grpc server 返回Err=[E2004] remote_window_left is not enough

Posted by GitBox <gi...@apache.org>.
zyearn edited a comment on issue #1346:
URL: https://github.com/apache/incubator-brpc/issues/1346#issuecomment-787417985


   找一下grpc server的h2 window_size的配置,然后把这个值调大就可以了。你的场景应该是client向grpc server发大包,默认情况下server端这个窗口是很小的(64K),需要手动调大。


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] lifeiyang commented on issue #1346: brpc 作为client 访问grpc server 返回Err=[E2004] remote_window_left is not enough

Posted by GitBox <gi...@apache.org>.
lifeiyang commented on issue #1346:
URL: https://github.com/apache/incubator-brpc/issues/1346#issuecomment-791180912


   grpc-c 里面没有提供对外的接口和配置能够手动修改h2 的connection_window_size, 它是通过BDP(bandwith delay production)来自动调节流控窗口的(包括stream_window_size和conn_window_size),我们通过比对发现grpc服务端启动的时候通过配置项: builder.AddChannelArgument(GRPC_ARG_HTTP2_BDP_PROBE, 0);  关闭了BDP;  这样server端就没法根据客户端发送的数据包大小,自动调节流控窗口大小,最终导致brpc 客户端无法持续发送大的数据包, 也就是说brpc client 和grpc server 端都保持默认的流控策略是没有任何问题的,感谢@zyearn的问题分析。


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] zyearn commented on issue #1346: brpc 作为client 访问grpc server 返回Err=[E2004] remote_window_left is not enough

Posted by GitBox <gi...@apache.org>.
zyearn commented on issue #1346:
URL: https://github.com/apache/incubator-brpc/issues/1346#issuecomment-789167328


   是因为_remote_window_left的初始值是MAX_WINDOW_SIZE,这个fetch_sub是把初始值恢复到DEFAULT_INITIAL_WINDOW_SIZE。
   
   改完grpc server的配置后再看看你之前贴图里面的H2Context { remote_setting =...} 有没有生效,否则再检查一下有没有正确设置,用grpc-go的话,需要设置两个变量。


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] lifeiyang commented on issue #1346: brpc 作为client 访问grpc server 返回Err=[E2004] remote_window_left is not enough

Posted by GitBox <gi...@apache.org>.
lifeiyang commented on issue #1346:
URL: https://github.com/apache/incubator-brpc/issues/1346#issuecomment-788605487


   > 找一下grpc server的h2 window_size的配置,然后把这个值调大就可以了。你的场景应该是client向grpc server发大包,默认情况下server端这个窗口是很小的(64K),需要手动调大。
   grpc server 端把stream_window_size 调大也没有效果,还是没发多次发送大包(超过50KB), brpc client这边的流控看着是connection 级别的 remote_window_left限制的原因,个人理解,每个http2连接开始时应该先接收到服务端的setting确定接收方的流控窗口大小,settting 初始化remote_window_left 如下代码所示:
   ![image](https://user-images.githubusercontent.com/3754939/109601722-55b30200-7b5a-11eb-9bf2-befbd9c316c9.png)
   图中所标注的代码行,为什么不直接写成如下:
   _remote_window_left.store(H2Settings::DEFAULT_INITIAL_WINDOW_SIZE, butil::memory_order_relaxed);
   @zyearn 麻烦大佬解惑,谢谢
   
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] lifeiyang edited a comment on issue #1346: brpc 作为client 访问grpc server 返回Err=[E2004] remote_window_left is not enough

Posted by GitBox <gi...@apache.org>.
lifeiyang edited a comment on issue #1346:
URL: https://github.com/apache/incubator-brpc/issues/1346#issuecomment-787066076


   > 尝试一下把brpc client的window_size调大,具体是这两个参数
   > 
   > * https://github.com/apache/incubator-brpc/blob/master/src/brpc/policy/http2_rpc_protocol.cpp#L37
   > * https://github.com/apache/incubator-brpc/blob/master/src/brpc/policy/http2_rpc_protocol.cpp#L39
   @zyearn 
   参数调整如下:
   ![image](https://user-images.githubusercontent.com/3754939/109387182-d4c9ef80-793a-11eb-940d-7a0429e69497.png)
   
   但是调大之后,依然没有效果,错误信息还是如下:
   Err=[E2004]remote_window_left is not enough, data_size=51208
   
   
   
   通过brpc的 ip:port/sockets/agent_server_id 查看的信息如下:
   红色标注框上面为remote_setting, 下面为local_setting
   ![image](https://user-images.githubusercontent.com/3754939/109387691-dea12200-793d-11eb-9469-c37b0a2f7318.png)
   
   
   是不是grpc server 返回的http2 交互信息中没有更新stream_window_size 导致本地remote_window_size 没法增加
   ![image](https://user-images.githubusercontent.com/3754939/109388265-0776e680-7941-11eb-8757-59d02b8ab57c.png)
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] lifeiyang commented on issue #1346: brpc 作为client 访问grpc server 返回Err=[E2004] remote_window_left is not enough

Posted by GitBox <gi...@apache.org>.
lifeiyang commented on issue #1346:
URL: https://github.com/apache/incubator-brpc/issues/1346#issuecomment-787316149


   还有什么需要修改的点吗?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] lifeiyang commented on issue #1346: brpc 作为client 访问grpc server 返回Err=[E2004] remote_window_left is not enough

Posted by GitBox <gi...@apache.org>.
lifeiyang commented on issue #1346:
URL: https://github.com/apache/incubator-brpc/issues/1346#issuecomment-786998114


   > **Describe the bug (描述bug)**
   > brpc 作为client 访问grpc server 第一次请求包大小大概50KB左右,能够正常返回,第二次发送同样大小的包,则会返回错误, 出现 Err=[E2004]remote_window_left is not enough , 我看之前有个关于remote_window_left is not enough的bug fix #849 是关于首次发送大包请求的问题,我目前用的brpc版本是0.9.7,已经包含了这个fix, 而且首次发送几MB的大包都没问题,但是第二次发送同样的包就会出现这个错误,麻烦各位大佬,指出问题所在,谢谢
   > **To Reproduce (复现方法)**
   > brpc作为client第一次访问grpc server的包大小为50KB左右,第二次同样的请求会出现Err=[E2004]remote_window_left is not enough
   > 
   > **Expected behavior (期望行为)**
   > 每次client端发送的大包请求都能够被正确处理
   > 
   > **Versions (各种版本)**
   > OS: centos 7.3
   > Compiler: gcc 7.3
   > brpc: 0.9.7
   > protobuf: protobuf 2.6
   > 
   > **Additional context/screenshots (更多上下文/截图)**
   
   @zyearn  麻烦大佬帮忙看看


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] lifeiyang edited a comment on issue #1346: brpc 作为client 访问grpc server 返回Err=[E2004] remote_window_left is not enough

Posted by GitBox <gi...@apache.org>.
lifeiyang edited a comment on issue #1346:
URL: https://github.com/apache/incubator-brpc/issues/1346#issuecomment-789618396


   > 是因为_remote_window_left的初始值是MAX_WINDOW_SIZE,这个fetch_sub是把初始值恢复到DEFAULT_INITIAL_WINDOW_SIZE。
   > 
   > 改完grpc server的配置后再看看你之前贴图里面的H2Context { remote_setting =...} 有没有生效,否则再检查一下有没有正确设置,用grpc-go的话,需要设置两个变量。
   
   server端使用的是grpc-c, 那边通过常量修改stream_window_size为1GB,观察已经生效,但是brpc client端的 remote_window_left值,还是只有几十KB, 如下图所示:
   ![image](https://user-images.githubusercontent.com/3754939/109794193-93925200-7c50-11eb-8258-37e6285cf9e6.png)
   
   下一步调整哪些参数或者逻辑能让remote_window_left继续增大以便于发送大数据量的包呢?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] zyearn commented on issue #1346: brpc 作为client 访问grpc server 返回Err=[E2004] remote_window_left is not enough

Posted by GitBox <gi...@apache.org>.
zyearn commented on issue #1346:
URL: https://github.com/apache/incubator-brpc/issues/1346#issuecomment-787417985


   找一下grpc server的h2 window_size的配置,然后把这个值调大就可以了。你的场景应该是client向grpc server发大包,默认情况下这个值server端这个窗口是很小的,需要手动调大。


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] zyearn edited a comment on issue #1346: brpc 作为client 访问grpc server 返回Err=[E2004] remote_window_left is not enough

Posted by GitBox <gi...@apache.org>.
zyearn edited a comment on issue #1346:
URL: https://github.com/apache/incubator-brpc/issues/1346#issuecomment-787417985


   找一下grpc server的h2 window_size的配置,然后把这个值调大就可以了。你的场景应该是client向grpc server发大包,默认情况下server端这个窗口是很小的,需要手动调大。


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] lifeiyang closed issue #1346: brpc 作为client 访问grpc server 返回Err=[E2004] remote_window_left is not enough

Posted by GitBox <gi...@apache.org>.
lifeiyang closed issue #1346:
URL: https://github.com/apache/incubator-brpc/issues/1346


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] lifeiyang commented on issue #1346: brpc 作为client 访问grpc server 返回Err=[E2004] remote_window_left is not enough

Posted by GitBox <gi...@apache.org>.
lifeiyang commented on issue #1346:
URL: https://github.com/apache/incubator-brpc/issues/1346#issuecomment-787597899


   > 找一下grpc server的h2 window_size的配置,然后把这个值调大就可以了。你的场景应该是client向grpc server发大包,默认情况下server端这个窗口是很小的(64K),需要手动调大。
   
   brpc 这边可以关闭流控吗?如何关闭?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org