You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2021/09/08 08:05:56 UTC

[GitHub] [servicecomb-java-chassis] huanghezhen opened a new issue #2557: 使用edge作为网关的时候,超时时 edge会进行重试

huanghezhen opened a new issue #2557:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2557


   重试 就导致 数据变成多条   如何设置这个


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

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



[GitHub] [servicecomb-java-chassis] huanghezhen commented on issue #2557: 使用edge作为网关的时候,超时时 edge会进行重试

Posted by GitBox <gi...@apache.org>.
huanghezhen commented on issue #2557:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2557#issuecomment-916692616


   通常来说是不会超时的, 我们自己本身就需要对服务器做测试,上面的问题来自下面这个场景
   因刚开始部署cce 给的cpu是0.25所以加载会特别慢   特别是第一次访问服务的时候 他需要加载其他服务的契约,导致了超时,这个时候我们再发现这个问题


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

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



[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #2557: 使用edge作为网关的时候,超时时 edge会进行重试

Posted by GitBox <gi...@apache.org>.
liubao68 commented on issue #2557:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2557#issuecomment-916669570


   超时的情况下会关闭连接, chrome会连续发送多次请求,是浏览器的问题。 参考: https://stackoverflow.com/questions/4460661/what-to-do-with-chrome-sending-extra-requests
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

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



[GitHub] [servicecomb-java-chassis] huanghezhen commented on issue #2557: 使用edge作为网关的时候,超时时 edge会进行重试

Posted by GitBox <gi...@apache.org>.
huanghezhen commented on issue #2557:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2557#issuecomment-915685295


   `2021-09-08 18:24:15.585 INFO 18424 --- [ntloop-thread-8] o.a.s.t.r.c.http.RestClientInvocation : Request timeout, Details: The timeout period of 30000ms has been exceeded while executing GET /healthExamination for server 192.168.2.79:8017.
   2021-09-08 18:24:15.586 ERROR 18424 --- [ntloop-thread-8] i.v.c.http.impl.HttpClientRequestImpl : io.vertx.core.http.impl.NoStackTraceTimeoutException: The timeout period of 30000ms has been exceeded while executing GET /healthExamination for server 192.168.2.79:8017
   2021-09-08 18:24:45.596 INFO 18424 --- [ntloop-thread-5] o.a.s.t.r.c.http.RestClientInvocation : Request timeout, Details: The timeout period of 30000ms has been exceeded while executing GET /healthExamination for server 192.168.2.79:8017.
   2021-09-08 18:24:45.597 ERROR 18424 --- [ntloop-thread-5] i.v.c.http.impl.HttpClientRequestImpl : io.vertx.core.http.impl.NoStackTraceTimeoutException: The timeout period of 30000ms has been exceeded while executing GET /healthExamination for server 192.168.2.79:8017`


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

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



[GitHub] [servicecomb-java-chassis] huanghezhen commented on issue #2557: 使用edge作为网关的时候,超时时 edge会进行重试

Posted by GitBox <gi...@apache.org>.
huanghezhen commented on issue #2557:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2557#issuecomment-916688972


   感谢!!!  我这边的解决方案是 做一个handler 判断是否是 408 超时异常,如果是408 我将他转为 500或者其他 来让浏览器不去处理超时重试,您看这个方案可以吗? 或者有没有更好的建议


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

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



[GitHub] [servicecomb-java-chassis] huanghezhen commented on issue #2557: 使用edge作为网关的时候,超时时 edge会进行重试

Posted by GitBox <gi...@apache.org>.
huanghezhen commented on issue #2557:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2557#issuecomment-915138667


   我们的场景是  当第一次调用的时候   开始加载契约信息的时间过长 导致了超时


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

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



[GitHub] [servicecomb-java-chassis] huanghezhen edited a comment on issue #2557: 使用edge作为网关的时候,超时时 edge会进行重试

Posted by GitBox <gi...@apache.org>.
huanghezhen edited a comment on issue #2557:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2557#issuecomment-915685295


   ```
   2021-09-08 18:24:15.585 INFO 18424 --- [ntloop-thread-8] o.a.s.t.r.c.http.RestClientInvocation : Request timeout, Details: The timeout period of 30000ms has been exceeded while executing GET /healthExamination for server 192.168.2.79:8017.
   2021-09-08 18:24:15.586 ERROR 18424 --- [ntloop-thread-8] i.v.c.http.impl.HttpClientRequestImpl : io.vertx.core.http.impl.NoStackTraceTimeoutException: The timeout period of 30000ms has been exceeded while executing GET /healthExamination for server 192.168.2.79:8017
   2021-09-08 18:24:45.596 INFO 18424 --- [ntloop-thread-5] o.a.s.t.r.c.http.RestClientInvocation : Request timeout, Details: The timeout period of 30000ms has been exceeded while executing GET /healthExamination for server 192.168.2.79:8017.
   2021-09-08 18:24:45.597 ERROR 18424 --- [ntloop-thread-5] i.v.c.http.impl.HttpClientRequestImpl : io.vertx.core.http.impl.NoStackTraceTimeoutException: The timeout period of 30000ms has been exceeded while executing GET /healthExamination for server 192.168.2.79:8017
   ```
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

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



[GitHub] [servicecomb-java-chassis] huanghezhen commented on issue #2557: 使用edge作为网关的时候,超时时 edge会进行重试

Posted by GitBox <gi...@apache.org>.
huanghezhen commented on issue #2557:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2557#issuecomment-915114448


   2021-09-08 18:24:15.585  INFO 18424 --- [ntloop-thread-8] o.a.s.t.r.c.http.RestClientInvocation    : Request timeout, Details: The timeout period of 30000ms has been exceeded while executing GET /healthExamination for server 192.168.2.79:8017.
   2021-09-08 18:24:15.586 ERROR 18424 --- [ntloop-thread-8] i.v.c.http.impl.HttpClientRequestImpl    : io.vertx.core.http.impl.NoStackTraceTimeoutException: The timeout period of 30000ms has been exceeded while executing GET /healthExamination for server 192.168.2.79:8017
   2021-09-08 18:24:45.596  INFO 18424 --- [ntloop-thread-5] o.a.s.t.r.c.http.RestClientInvocation    : Request timeout, Details: The timeout period of 30000ms has been exceeded while executing GET /healthExamination for server 192.168.2.79:8017.
   2021-09-08 18:24:45.597 ERROR 18424 --- [ntloop-thread-5] i.v.c.http.impl.HttpClientRequestImpl    : io.vertx.core.http.impl.NoStackTraceTimeoutException: The timeout period of 30000ms has been exceeded while executing GET /healthExamination for server 192.168.2.79:8017
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

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



[GitHub] [servicecomb-java-chassis] huanghezhen commented on issue #2557: 使用edge作为网关的时候,超时时 edge会进行重试

Posted by GitBox <gi...@apache.org>.
huanghezhen commented on issue #2557:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2557#issuecomment-915118169


   servicecomb:
     invocation:
       timeout:
         check:
           enabled: false


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

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



[GitHub] [servicecomb-java-chassis] huanghezhen commented on issue #2557: 使用edge作为网关的时候,超时时 edge会进行重试

Posted by GitBox <gi...@apache.org>.
huanghezhen commented on issue #2557:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2557#issuecomment-915685768


   找了很多文档 没找到如歌关闭重试机制
   `  loadbalance:
       retryEnabled: false`
   也不行


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

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



[GitHub] [servicecomb-java-chassis] huanghezhen commented on issue #2557: 使用edge作为网关的时候,超时时 edge会进行重试

Posted by GitBox <gi...@apache.org>.
huanghezhen commented on issue #2557:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2557#issuecomment-916693278


   所以我还想咨询一下,我们的服务可以再启动的时候就去加载其他服务的契约吗,而不是发生再第一次调用的时候,这个我找文档没找到这个的解决方案


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

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



[GitHub] [servicecomb-java-chassis] huanghezhen removed a comment on issue #2557: 使用edge作为网关的时候,超时时 edge会进行重试

Posted by GitBox <gi...@apache.org>.
huanghezhen removed a comment on issue #2557:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2557#issuecomment-916565966


   我这边创建一个 全局的异常处理  InvocationException   捕捉这个异常 就不会出现那个情况了


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

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



[GitHub] [servicecomb-java-chassis] fanjiang-2021 commented on issue #2557: 使用edge作为网关的时候,超时时 edge会进行重试

Posted by GitBox <gi...@apache.org>.
fanjiang-2021 commented on issue #2557:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2557#issuecomment-915925483


   java-chassis提供的重试功能  对于重试场景 会有重试线程处理 retry-pool-thread- 


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

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



[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #2557: 使用edge作为网关的时候,超时时 edge会进行重试

Posted by GitBox <gi...@apache.org>.
liubao68 commented on issue #2557:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2557#issuecomment-915068405


   能提供点具体信息吗,比如重试日志。 


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

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



[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #2557: 使用edge作为网关的时候,超时时 edge会进行重试

Posted by GitBox <gi...@apache.org>.
liubao68 commented on issue #2557:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2557#issuecomment-915738938


   你提供的日志看不出来是重试,也不像是启用了java-chassis提供的重试功能。 估计得调试分析下重试是如何发生的,建议用个简单DEMO先验证分析下失败过程。 


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

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



[GitHub] [servicecomb-java-chassis] huanghezhen commented on issue #2557: 使用edge作为网关的时候,超时时 edge会进行重试

Posted by GitBox <gi...@apache.org>.
huanghezhen commented on issue #2557:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2557#issuecomment-915114906


   网关30秒超时之后 重新发起请求了  期望是直接报错


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

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



[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #2557: 使用edge作为网关的时候,超时时 edge会进行重试

Posted by GitBox <gi...@apache.org>.
liubao68 commented on issue #2557:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2557#issuecomment-916695262


   可以监听[服务事件](https://servicecomb.apache.org/references/java-chassis/zh_CN/build-provider/event-listener.html), 调用一下其他服务的 /health 接口。 


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

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



[GitHub] [servicecomb-java-chassis] huanghezhen commented on issue #2557: 使用edge作为网关的时候,超时时 edge会进行重试

Posted by GitBox <gi...@apache.org>.
huanghezhen commented on issue #2557:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2557#issuecomment-915868584


   我不知道该怎么形容这个问题  我大概描述一下  
   现在有网关A 和 服务B     网关A 我设置了  `servicecomb:
     request:
       timeout: 2000`  然后我使用浏览器地址栏里面调用接口C (是走网关的,然后我睡眠了60秒) 的时候   报如下错
   `11111111111111111111111111111
   2021-09-09 15:30:45.948  INFO 44260 --- [ntloop-thread-1] o.a.s.t.r.c.http.RestClientInvocation    : Request timeout, Details: The timeout period of 2000ms has been exceeded while executing GET /healthExamination for server 192.168.2.79:8017.
   2021-09-09 15:30:45.949 ERROR 44260 --- [ntloop-thread-1] i.v.c.http.impl.HttpClientRequestImpl    : io.vertx.core.http.impl.NoStackTraceTimeoutException: The timeout period of 2000ms has been exceeded while executing GET /healthExamination for server 192.168.2.79:8017
   11111111111111111111111111111
   2021-09-09 15:30:47.962  INFO 44260 --- [ntloop-thread-2] o.a.s.t.r.c.http.RestClientInvocation    : Request timeout, Details: The timeout period of 2000ms has been exceeded while executing GET /healthExamination for server 192.168.2.79:8017.
   2021-09-09 15:30:47.963 ERROR 44260 --- [ntloop-thread-2] i.v.c.http.impl.HttpClientRequestImpl    : io.vertx.core.http.impl.NoStackTraceTimeoutException: The timeout period of 2000ms has been exceeded while executing GET /healthExamination for server 192.168.2.79:8017
   11111111111111111111111111111
   2021-09-09 15:30:49.972  INFO 44260 --- [ntloop-thread-5] o.a.s.t.r.c.http.RestClientInvocation    : Request timeout, Details: The timeout period of 2000ms has been exceeded while executing GET /healthExamination for server 192.168.2.79:8017.
   2021-09-09 15:30:49.973 ERROR 44260 --- [ntloop-thread-5] i.v.c.http.impl.HttpClientRequestImpl    : io.vertx.core.http.impl.NoStackTraceTimeoutException: The timeout period of 2000ms has been exceeded while executing GET /healthExamination for server 192.168.2.79:8017
   `
   
   然后过了 6.04秒之后 报错
   `{
   "message": "Request Timeout."
   }`
   也就是用了浏览器调用时网关会被调用三次之后 抛出超时异常  但是看浏览器控制台的请求记录就是一个
   
   
   
   然后我使用postman测试时 就只调用了一次 然后返回超时  花费的时间时2s 也就是我设置的超时时间
   
   
   总结:  postman 是希望的结果,就是浏览器出现的情况没理解是什么问题
   
   
   补充: 使用浏览器的 ajax请求的时候 也是一样的问题


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

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



[GitHub] [servicecomb-java-chassis] huanghezhen commented on issue #2557: 使用edge作为网关的时候,超时时 edge会进行重试

Posted by GitBox <gi...@apache.org>.
huanghezhen commented on issue #2557:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2557#issuecomment-916072305


   都启动之后 访问   127.0.0.1:5000/pay/demo


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

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



[GitHub] [servicecomb-java-chassis] liubao68 edited a comment on issue #2557: 使用edge作为网关的时候,超时时 edge会进行重试

Posted by GitBox <gi...@apache.org>.
liubao68 edited a comment on issue #2557:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2557#issuecomment-915738938


   你提供的日志看不出来是重试,也不像是启用了java-chassis提供的重试功能。倒像是并发发送了N个请求,都超时了。 估计得调试分析下重试是如何发生的,建议用个简单DEMO先验证分析下失败过程。 


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

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



[GitHub] [servicecomb-java-chassis] huanghezhen commented on issue #2557: 使用edge作为网关的时候,超时时 edge会进行重试

Posted by GitBox <gi...@apache.org>.
huanghezhen commented on issue #2557:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2557#issuecomment-915139308


   `servicecomb:
   invocation:
   timeout:
   check:
   enabled: false` 我理解错这个意思了


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

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



[GitHub] [servicecomb-java-chassis] huanghezhen edited a comment on issue #2557: 使用edge作为网关的时候,超时时 edge会进行重试

Posted by GitBox <gi...@apache.org>.
huanghezhen edited a comment on issue #2557:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2557#issuecomment-915868584


   我不知道该怎么形容这个问题  我大概描述一下  
   现在有网关A 和 服务B     网关A 我设置了  `servicecomb:
     request:
       timeout: 2000`  然后我使用浏览器地址栏里面调用接口C (是走网关的,然后我睡眠了60秒) 的时候   报如下错
   ```
   11111111111111111111111111111
   2021-09-09 15:30:45.948  INFO 44260 --- [ntloop-thread-1] o.a.s.t.r.c.http.RestClientInvocation    : Request timeout, Details: The timeout period of 2000ms has been exceeded while executing GET /healthExamination for server 192.168.2.79:8017.
   2021-09-09 15:30:45.949 ERROR 44260 --- [ntloop-thread-1] i.v.c.http.impl.HttpClientRequestImpl    : io.vertx.core.http.impl.NoStackTraceTimeoutException: The timeout period of 2000ms has been exceeded while executing GET /healthExamination for server 192.168.2.79:8017
   11111111111111111111111111111
   2021-09-09 15:30:47.962  INFO 44260 --- [ntloop-thread-2] o.a.s.t.r.c.http.RestClientInvocation    : Request timeout, Details: The timeout period of 2000ms has been exceeded while executing GET /healthExamination for server 192.168.2.79:8017.
   2021-09-09 15:30:47.963 ERROR 44260 --- [ntloop-thread-2] i.v.c.http.impl.HttpClientRequestImpl    : io.vertx.core.http.impl.NoStackTraceTimeoutException: The timeout period of 2000ms has been exceeded while executing GET /healthExamination for server 192.168.2.79:8017
   11111111111111111111111111111
   2021-09-09 15:30:49.972  INFO 44260 --- [ntloop-thread-5] o.a.s.t.r.c.http.RestClientInvocation    : Request timeout, Details: The timeout period of 2000ms has been exceeded while executing GET /healthExamination for server 192.168.2.79:8017.
   2021-09-09 15:30:49.973 ERROR 44260 --- [ntloop-thread-5] i.v.c.http.impl.HttpClientRequestImpl    : io.vertx.core.http.impl.NoStackTraceTimeoutException: The timeout period of 2000ms has been exceeded while executing GET /healthExamination for server 192.168.2.79:8017
   ```
   
   然后过了 6.04秒之后 报错
   `{
   "message": "Request Timeout."
   }`
   也就是用了浏览器调用时网关会被调用三次之后 抛出超时异常  但是看浏览器控制台的请求记录就是一个
   
   
   
   然后我使用postman测试时 就只调用了一次 然后返回超时  花费的时间时2s 也就是我设置的超时时间
   
   
   总结:  postman 是希望的结果,就是浏览器出现的情况没理解是什么问题
   
   
   补充: 使用浏览器的 ajax请求的时候 也是一样的问题


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

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



[GitHub] [servicecomb-java-chassis] huanghezhen edited a comment on issue #2557: 使用edge作为网关的时候,超时时 edge会进行重试

Posted by GitBox <gi...@apache.org>.
huanghezhen edited a comment on issue #2557:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2557#issuecomment-915868584


   我不知道该怎么形容这个问题  我大概描述一下  
   现在有网关A 和 服务B     网关A 我设置了  `servicecomb:
     request:
       timeout: 2000`  然后我使用浏览器地址栏里面调用接口C (是走网关的,然后我睡眠了60秒) 的时候   报如下错
   `
   11111111111111111111111111111
   2021-09-09 15:30:45.948  INFO 44260 --- [ntloop-thread-1] o.a.s.t.r.c.http.RestClientInvocation    : Request timeout, Details: The timeout period of 2000ms has been exceeded while executing GET /healthExamination for server 192.168.2.79:8017.
   2021-09-09 15:30:45.949 ERROR 44260 --- [ntloop-thread-1] i.v.c.http.impl.HttpClientRequestImpl    : io.vertx.core.http.impl.NoStackTraceTimeoutException: The timeout period of 2000ms has been exceeded while executing GET /healthExamination for server 192.168.2.79:8017
   11111111111111111111111111111
   2021-09-09 15:30:47.962  INFO 44260 --- [ntloop-thread-2] o.a.s.t.r.c.http.RestClientInvocation    : Request timeout, Details: The timeout period of 2000ms has been exceeded while executing GET /healthExamination for server 192.168.2.79:8017.
   2021-09-09 15:30:47.963 ERROR 44260 --- [ntloop-thread-2] i.v.c.http.impl.HttpClientRequestImpl    : io.vertx.core.http.impl.NoStackTraceTimeoutException: The timeout period of 2000ms has been exceeded while executing GET /healthExamination for server 192.168.2.79:8017
   11111111111111111111111111111
   2021-09-09 15:30:49.972  INFO 44260 --- [ntloop-thread-5] o.a.s.t.r.c.http.RestClientInvocation    : Request timeout, Details: The timeout period of 2000ms has been exceeded while executing GET /healthExamination for server 192.168.2.79:8017.
   2021-09-09 15:30:49.973 ERROR 44260 --- [ntloop-thread-5] i.v.c.http.impl.HttpClientRequestImpl    : io.vertx.core.http.impl.NoStackTraceTimeoutException: The timeout period of 2000ms has been exceeded while executing GET /healthExamination for server 192.168.2.79:8017
   `
   
   然后过了 6.04秒之后 报错
   `{
   "message": "Request Timeout."
   }`
   也就是用了浏览器调用时网关会被调用三次之后 抛出超时异常  但是看浏览器控制台的请求记录就是一个
   
   
   
   然后我使用postman测试时 就只调用了一次 然后返回超时  花费的时间时2s 也就是我设置的超时时间
   
   
   总结:  postman 是希望的结果,就是浏览器出现的情况没理解是什么问题
   
   
   补充: 使用浏览器的 ajax请求的时候 也是一样的问题


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

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



[GitHub] [servicecomb-java-chassis] huanghezhen removed a comment on issue #2557: 使用edge作为网关的时候,超时时 edge会进行重试

Posted by GitBox <gi...@apache.org>.
huanghezhen removed a comment on issue #2557:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2557#issuecomment-915114448






-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

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



[GitHub] [servicecomb-java-chassis] huanghezhen commented on issue #2557: 使用edge作为网关的时候,超时时 edge会进行重试

Posted by GitBox <gi...@apache.org>.
huanghezhen commented on issue #2557:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2557#issuecomment-916071888


   https://github.com/huanghezhen/servicecombtest.git


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

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



[GitHub] [servicecomb-java-chassis] huanghezhen closed issue #2557: 使用edge作为网关的时候,超时时 edge会进行重试

Posted by GitBox <gi...@apache.org>.
huanghezhen closed issue #2557:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2557


   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

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



[GitHub] [servicecomb-java-chassis] huanghezhen commented on issue #2557: 使用edge作为网关的时候,超时时 edge会进行重试

Posted by GitBox <gi...@apache.org>.
huanghezhen commented on issue #2557:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2557#issuecomment-916565966


   我这边创建一个 全局的异常处理  InvocationException   捕捉这个异常 就不会出现那个情况了


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

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



[GitHub] [servicecomb-java-chassis] huanghezhen edited a comment on issue #2557: 使用edge作为网关的时候,超时时 edge会进行重试

Posted by GitBox <gi...@apache.org>.
huanghezhen edited a comment on issue #2557:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2557#issuecomment-916692616


   通常来说是不会超时的, 我们自己本身就需要对服务器做测试,上面的问题来自下面这个场景
   因刚开始部署cce 给的cpu是0.25所以加载会特别慢   特别是第一次访问服务的时候 他需要加载其他服务的契约,导致了超时,这个时候我们才发现这个问题


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

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



[GitHub] [servicecomb-java-chassis] huanghezhen commented on issue #2557: 使用edge作为网关的时候,超时时 edge会进行重试

Posted by GitBox <gi...@apache.org>.
huanghezhen commented on issue #2557:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2557#issuecomment-916702730


   好的好的 感谢感谢!!!


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

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



[GitHub] [servicecomb-java-chassis] huanghezhen commented on issue #2557: 使用edge作为网关的时候,超时时 edge会进行重试

Posted by GitBox <gi...@apache.org>.
huanghezhen commented on issue #2557:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2557#issuecomment-915130561


   找到文档说默认是关闭的 不知道为什么还会重试


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

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



[GitHub] [servicecomb-java-chassis] huanghezhen commented on issue #2557: 使用edge作为网关的时候,超时时 edge会进行重试

Posted by GitBox <gi...@apache.org>.
huanghezhen commented on issue #2557:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2557#issuecomment-916028878


   > java-chassis提供的重试功能 对于重试场景 会有重试线程处理 retry-pool-thread-
   我遇到的这个情况该如何处理呢


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

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



[GitHub] [servicecomb-java-chassis] huanghezhen commented on issue #2557: 使用edge作为网关的时候,超时时 edge会进行重试

Posted by GitBox <gi...@apache.org>.
huanghezhen commented on issue #2557:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2557#issuecomment-916054344


   简单的说就是浏览器通过网关调用服务的接口,当这个服务处理超时的时候(业务代码还是在处理,只是处理的时间长) 网关会再次发起调用(这里我不知道是不是浏览器发起的,但是浏览器的后台就是一次记录) 就导致 insert 的业务发生了多次(本该是一次的)


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

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