You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/09/24 02:05:25 UTC

[GitHub] [apisix] gxthrj opened a new issue #2295: request help: Too many connections when using etcdv3

gxthrj opened a new issue #2295:
URL: https://github.com/apache/apisix/issues/2295


   ### Issue description
   using `etcd v3` find too many connections.
   I deployed an apisix and started 4 workers, Up to 300+ connections
   
   ![image](https://user-images.githubusercontent.com/4413028/94092445-5ded6f80-fe4d-11ea-8dee-d2a1c31e27c2.png)
   
   
   
   
   ### Environment
   
   * apisix version : 7beafd345a96b5fc14d9230731f284429ad7168e
   * OS: Centos Linux release 7.4.1708 (Core)
   ![image](https://user-images.githubusercontent.com/4413028/94091746-99873a00-fe4b-11ea-960c-3b679ce2dd38.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



[GitHub] [apisix] Yiyiyimu commented on issue #2295: request help: Too many connections when using etcdv3

Posted by GitBox <gi...@apache.org>.
Yiyiyimu commented on issue #2295:
URL: https://github.com/apache/apisix/issues/2295#issuecomment-698796830


   > **Update**: I run apisix for about 3 hours now, the connection grows to 700 from 100, but right now it decreases to about 300, so it is not always growing.
   
   So I think we could infer that when `watch` timeouts, the connection doesn't timeout on time, on the contrary, it got timeout some time later. 


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



[GitHub] [apisix] Yiyiyimu commented on issue #2295: request help: Too many connections when using etcdv3

Posted by GitBox <gi...@apache.org>.
Yiyiyimu commented on issue #2295:
URL: https://github.com/apache/apisix/issues/2295#issuecomment-698216556


   > how many connections ?
   > does the number grow over time?
   
   Yes the number grow over time. It could grow to 1000+ in my environment.


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



[GitHub] [apisix] nic-chen commented on issue #2295: request help: Too many connections when using etcdv3

Posted by GitBox <gi...@apache.org>.
nic-chen commented on issue #2295:
URL: https://github.com/apache/apisix/issues/2295#issuecomment-698067918


   @Yiyiyimu 
   please take a look.
   I think we could use `cancel watch` to improve it.


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



[GitHub] [apisix] nic-chen commented on issue #2295: request help: Too many connections when using etcdv3

Posted by GitBox <gi...@apache.org>.
nic-chen commented on issue #2295:
URL: https://github.com/apache/apisix/issues/2295#issuecomment-698207960


   @Yiyiyimu  
   how many connections ? 
   does the number grow over time?


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



[GitHub] [apisix] Yiyiyimu commented on issue #2295: request help: Too many connections when using etcdv3

Posted by GitBox <gi...@apache.org>.
Yiyiyimu commented on issue #2295:
URL: https://github.com/apache/apisix/issues/2295#issuecomment-698078050


   thx. working on it


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



[GitHub] [apisix] Yiyiyimu commented on issue #2295: request help: Too many connections when using etcdv3

Posted by GitBox <gi...@apache.org>.
Yiyiyimu commented on issue #2295:
URL: https://github.com/apache/apisix/issues/2295#issuecomment-698760792


   > > how many connections ?
   > > does the number grow over time?
   > 
   > Yes the number grow over time. It could grow to 1000+ in my environment.
   
   **Update**: I run apisix for about 3 hours now, the connection grows to 700 from 100, but right now it decreases to about 300, so it is not always growing.


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



[GitHub] [apisix] Yiyiyimu edited a comment on issue #2295: request help: Too many connections when using etcdv3

Posted by GitBox <gi...@apache.org>.
Yiyiyimu edited a comment on issue #2295:
URL: https://github.com/apache/apisix/issues/2295#issuecomment-698111884


   [`etcd_cli:watchcancel`](https://github.com/api7/lua-resty-etcd/blob/9d5ed56b3231527a12543e9865e6bfb79a38427f/lib/resty/etcd/v3.lua#L685-L690) does close the http_cli of `watch`, which should ["close the current connection"](https://github.com/ledgetech/lua-resty-http#close), but it still could not fix this issue.
   
   
   I upload the modified version to #2299 for test


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



[GitHub] [apisix] Yiyiyimu commented on issue #2295: request help: Too many connections when using etcdv3

Posted by GitBox <gi...@apache.org>.
Yiyiyimu commented on issue #2295:
URL: https://github.com/apache/apisix/issues/2295#issuecomment-698111884






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



[GitHub] [apisix] moonming closed issue #2295: request help: Too many connections when using etcdv3

Posted by GitBox <gi...@apache.org>.
moonming closed issue #2295:
URL: https://github.com/apache/apisix/issues/2295


   


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



[GitHub] [apisix] Yiyiyimu commented on issue #2295: request help: Too many connections when using etcdv3

Posted by GitBox <gi...@apache.org>.
Yiyiyimu commented on issue #2295:
URL: https://github.com/apache/apisix/issues/2295#issuecomment-698996802


   > [`etcd_cli:watchcancel`](https://github.com/api7/lua-resty-etcd/blob/9d5ed56b3231527a12543e9865e6bfb79a38427f/lib/resty/etcd/v3.lua#L685-L690) does close the http_cli of `watch`, which should ["close the current connection"](https://github.com/ledgetech/lua-resty-http#close), but it still could not fix this issue.
   > 
   > I upload the modified version to #2299 for test
   
   As mentioned before, I choose to close the HTTP connection but not use the native etcd `cancel_request` since the native implementation is not working, and it is confirmed in https://github.com/etcd-io/etcd/issues/12333


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



[GitHub] [apisix] nic-chen commented on issue #2295: request help: Too many connections when using etcdv3

Posted by GitBox <gi...@apache.org>.
nic-chen commented on issue #2295:
URL: https://github.com/apache/apisix/issues/2295#issuecomment-698207960


   @Yiyiyimu  
   how many connections ? 
   does the number grow over time?


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



[GitHub] [apisix] Yiyiyimu edited a comment on issue #2295: request help: Too many connections when using etcdv3

Posted by GitBox <gi...@apache.org>.
Yiyiyimu edited a comment on issue #2295:
URL: https://github.com/apache/apisix/issues/2295#issuecomment-698111884


   [`etcd_cli:watchcancel`](https://github.com/api7/lua-resty-etcd/blob/9d5ed56b3231527a12543e9865e6bfb79a38427f/lib/resty/etcd/v3.lua#L685-L690) does close the http_cli of `watch`, which should ["close the current connection"](https://github.com/ledgetech/lua-resty-http#close), but it still could not fix this issue.
   
   
   I upload the modified version to #2299 for test


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



[GitHub] [apisix] Yiyiyimu commented on issue #2295: request help: Too many connections when using etcdv3

Posted by GitBox <gi...@apache.org>.
Yiyiyimu commented on issue #2295:
URL: https://github.com/apache/apisix/issues/2295#issuecomment-698111884


   `etcd_cli:watchcancel` does close the http_cli of `watch`, which should ["close the current connection"](https://github.com/ledgetech/lua-resty-http#close), but it still could not fix this issue.
   
   I upload the modified version to #2299 for test


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