Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Too many open file handles #2787

Closed
4 tasks
greg-szabo opened this issue Nov 12, 2018 · 6 comments
Closed
4 tasks

Too many open file handles #2787

greg-szabo opened this issue Nov 12, 2018 · 6 comments

Comments

@greg-szabo
Copy link
Member

Summary of Bug

gaiad and gaiacli uses too many file handles

Steps to Reproduce

(This is on gaia-seed4, while running gaia-9001. Seed4 was underutilized.)

[root@gaia-seed4 ~]# lsof | grep ^gaiad | wc -l
30058
[root@gaia-seed4 ~]# lsof | grep ^gaiacli | wc -l
42630
[root@gaia-seed4 ~]# lsof | grep -e '^gaiad.*TCP.*CLOSE_WAIT' | wc -l
5282
[root@gaia-seed4 ~]# lsof | grep -e '^gaiacli.*TCP.*CLOSE_WAIT' | wc -l
17934
[root@gaia-seed4 ~]# lsof | grep '^gaiad.*TCP.*ESTABLISHED' | wc -l
20786
[root@gaia-seed4 ~]# lsof | grep '^gaiacli.*TCP.*ESTABLISHED' | wc -l
21042
#gaiad process
[root@gaia-seed4 ~]# lsof -p 27226 | wc -l
1584
#gaiacli process
[root@gaia-seed4 ~]# lsof -p 16667 | wc -l
2031

It seems we need better TCP handling, but feel free to discuss it more.
Unrelated similar report from eariler: #1394


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@ebuchman
Copy link
Member

Why is gaiacli running on the seed node?

@greg-szabo
Copy link
Member Author

Because when we first introduced seed nodes (around gaia-6000), the Voyager team reached out and said that they need the gaiacli LCD so they can run Voyager on the network and the Explorer website.
Since gaiacli required a full node but it works on the seed nodes too, we didn't set up full nodes separately for them.

@ebuchman
Copy link
Member

Cool - but why does it have so many open TCP connections ?!

@ackratos
Copy link
Contributor

ackratos commented Jan 4, 2019

Cool - but why does it have so many open TCP connections ?!

we experienced similar issue on our chain, some validators each hold 26000+ CLOSE_WAIT tcp connection with two witness nodes.

Checking witness node logs, it seems block reactor bug caused the top 2 blocks synced are in in-consistent state (second block's last commit id cannot match first block's commit id). As we don't have debug level log, cannot tell about how block reactor comes in this situation and cannot make sure all connections are caused by this. (restarting problematic validators can resolve this issue temporally)

I[12-28|11:26:37.790] Dialing peer                                 module=p2p address=638eabc55ac2cd1ec92e9edeac1c6d412a4a5d3c@10.203.43.118:26656
I[12-28|11:26:37.796] Starting Peer                                module=p2p peer=0xb0de50 impl="Peer{MConn{10.203.43.118:26656} 20cb9667e5c4040c510d3cd795361f4b98969798 out}"
I[12-28|11:26:37.796] Starting MConnection                         module=p2p peer=0xb0de50 impl=MConn{10.203.43.118:26656}
I[12-28|11:26:37.796] Added peer                                   module=p2p peer="Peer{MConn{10.203.43.118:26656} 20cb9667e5c4040c510d3cd795361f4b98969798 out}"
E[12-28|11:26:37.936] Error in validation                          module=blockchain err="Invalid commit -- wrong block id: want FB99188E4993C0C02C854D05BDD0DC9468BBCE0E:1:CB98105DAA13 got 01FF4061F5F229D21ECDE836D1A2E1C7AE9346CB:1:4D1563CAD2BB"
E[12-28|11:26:37.936] Stopping peer for error                      module=p2p peer="Peer{MConn{10.203.43.118:26656} 20cb9667e5c4040c510d3cd795361f4b98969798 out}" err="BlockchainReactor validation error: Invalid commit -- wrong block id: want FB99188E4993C0C02C854D05BDD0DC9468BBCE0E:1:CB98105DAA13 got 01FF4061F5F229D21ECDE836D1A2E1C7AE9346CB:1:4D1563CAD2BB"
I[12-28|11:26:37.936] Stopping Peer                                module=p2p peer=0xb0de50 impl="Peer{MConn{10.203.43.118:26656} 20cb9667e5c4040c510d3cd795361f4b98969798 out}"
I[12-28|11:26:37.936] Stopping MConnection                         module=p2p peer=0xb0de50 impl=MConn{10.203.43.118:26656}
I[12-28|11:26:37.937] Reconnecting to peer                         module=p2p addr=20cb9667e5c4040c510d3cd795361f4b98969798@10.203.43.118:26656

@jackzampolin
Copy link
Member

@ackratos I think that might be more of a tendermint issue! The linked issue (tendermint#2967) might have some more information for you!

@jackzampolin
Copy link
Member

Going to go ahead and close this as solved by systemd file and linux settings. We also point people to this fix in the docs.

chillyvee pushed a commit to chillyvee/cosmos-sdk that referenced this issue Mar 1, 2024
…2787)

Bumps [github.com/gorilla/mux](https://github.com/gorilla/mux) from 1.8.0 to 1.8.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/gorilla/mux/releases">github.com/gorilla/mux's releases</a>.</em></p>
<blockquote>
<h2>Release v1.8.1</h2>
<h2>What's Changed</h2>
<ul>
<li>build: CircleCI 2.1 + build matrix by <a href="https://github.com/elithrar"><code>@​elithrar</code></a> in <a href="https://redirect.github.com/gorilla/mux/pull/595">gorilla/mux#595</a></li>
<li>Include &quot;404&quot; and &quot;405&quot; in the docs by <a href="https://github.com/Jille"><code>@​Jille</code></a> in <a href="https://redirect.github.com/gorilla/mux/pull/602">gorilla/mux#602</a></li>
<li>docs: update README w.r.t new maintainer ask by <a href="https://github.com/elithrar"><code>@​elithrar</code></a> in <a href="https://redirect.github.com/gorilla/mux/pull/660">gorilla/mux#660</a></li>
<li>regexp: use iota instead of hardcoded values for regexType* by <a href="https://github.com/michaelgrigoryan25"><code>@​michaelgrigoryan25</code></a> in <a href="https://redirect.github.com/gorilla/mux/pull/679">gorilla/mux#679</a></li>
<li>Fix <code>authenticationMiddleware</code> initialization in the <code>README.md</code> file by <a href="https://github.com/amustaque97"><code>@​amustaque97</code></a> in <a href="https://redirect.github.com/gorilla/mux/pull/693">gorilla/mux#693</a></li>
<li>Update README.md by <a href="https://github.com/coreydaley"><code>@​coreydaley</code></a> in <a href="https://redirect.github.com/gorilla/mux/pull/713">gorilla/mux#713</a></li>
<li>[GPT-95] Update go version, add tools for verification and testing by <a href="https://github.com/apoorvajagtap"><code>@​apoorvajagtap</code></a> in <a href="https://redirect.github.com/gorilla/mux/pull/718">gorilla/mux#718</a></li>
<li>Delete release-drafter.yml by <a href="https://github.com/coreydaley"><code>@​coreydaley</code></a> in <a href="https://redirect.github.com/gorilla/mux/pull/719">gorilla/mux#719</a></li>
<li>Delete stale.yml by <a href="https://github.com/coreydaley"><code>@​coreydaley</code></a> in <a href="https://redirect.github.com/gorilla/mux/pull/720">gorilla/mux#720</a></li>
<li>Delete AUTHORS by <a href="https://github.com/coreydaley"><code>@​coreydaley</code></a> in <a href="https://redirect.github.com/gorilla/mux/pull/721">gorilla/mux#721</a></li>
<li>Update LICENSE by <a href="https://github.com/coreydaley"><code>@​coreydaley</code></a> in <a href="https://redirect.github.com/gorilla/mux/pull/722">gorilla/mux#722</a></li>
<li>Updated the logo in README.md by <a href="https://github.com/shamkarthik"><code>@​shamkarthik</code></a> in <a href="https://redirect.github.com/gorilla/mux/pull/724">gorilla/mux#724</a></li>
<li>Update LICENSE by <a href="https://github.com/coreydaley"><code>@​coreydaley</code></a> in <a href="https://redirect.github.com/gorilla/mux/pull/723">gorilla/mux#723</a></li>
<li>Update issues.yml by <a href="https://github.com/coreydaley"><code>@​coreydaley</code></a> in <a href="https://redirect.github.com/gorilla/mux/pull/726">gorilla/mux#726</a></li>
<li>Update issues.yml by <a href="https://github.com/coreydaley"><code>@​coreydaley</code></a> in <a href="https://redirect.github.com/gorilla/mux/pull/727">gorilla/mux#727</a></li>
<li>run go fmt with Go 1.20 by <a href="https://github.com/shogo82148"><code>@​shogo82148</code></a> in <a href="https://redirect.github.com/gorilla/mux/pull/725">gorilla/mux#725</a></li>
<li>Fix  <code>Single Page Application</code> example in <code>README.md</code> file by <a href="https://github.com/amustaque97"><code>@​amustaque97</code></a> in <a href="https://redirect.github.com/gorilla/mux/pull/678">gorilla/mux#678</a></li>
<li>[BUG] Inconsistent HTTP status code on query mismatch by <a href="https://github.com/soheilrt"><code>@​soheilrt</code></a> in <a href="https://redirect.github.com/gorilla/mux/pull/712">gorilla/mux#712</a></li>
<li>Clarify documentation examples of Route methods by <a href="https://github.com/andrew-werdna"><code>@​andrew-werdna</code></a> in <a href="https://redirect.github.com/gorilla/mux/pull/672">gorilla/mux#672</a></li>
<li>changed the routeVariables text content. by <a href="https://github.com/sumanpaikdev"><code>@​sumanpaikdev</code></a> in <a href="https://redirect.github.com/gorilla/mux/pull/708">gorilla/mux#708</a></li>
<li>Add GetVarNames() by <a href="https://github.com/eh-steve"><code>@​eh-steve</code></a> in <a href="https://redirect.github.com/gorilla/mux/pull/676">gorilla/mux#676</a></li>
<li>fix SPA handler in README.md by <a href="https://github.com/sy9"><code>@​sy9</code></a> in <a href="https://redirect.github.com/gorilla/mux/pull/733">gorilla/mux#733</a></li>
<li>update GitHub workflows by <a href="https://github.com/coreydaley"><code>@​coreydaley</code></a> in <a href="https://redirect.github.com/gorilla/mux/pull/734">gorilla/mux#734</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/Jille"><code>@​Jille</code></a> made their first contribution in <a href="https://redirect.github.com/gorilla/mux/pull/602">gorilla/mux#602</a></li>
<li><a href="https://github.com/michaelgrigoryan25"><code>@​michaelgrigoryan25</code></a> made their first contribution in <a href="https://redirect.github.com/gorilla/mux/pull/679">gorilla/mux#679</a></li>
<li><a href="https://github.com/amustaque97"><code>@​amustaque97</code></a> made their first contribution in <a href="https://redirect.github.com/gorilla/mux/pull/693">gorilla/mux#693</a></li>
<li><a href="https://github.com/coreydaley"><code>@​coreydaley</code></a> made their first contribution in <a href="https://redirect.github.com/gorilla/mux/pull/713">gorilla/mux#713</a></li>
<li><a href="https://github.com/apoorvajagtap"><code>@​apoorvajagtap</code></a> made their first contribution in <a href="https://redirect.github.com/gorilla/mux/pull/718">gorilla/mux#718</a></li>
<li><a href="https://github.com/shamkarthik"><code>@​shamkarthik</code></a> made their first contribution in <a href="https://redirect.github.com/gorilla/mux/pull/724">gorilla/mux#724</a></li>
<li><a href="https://github.com/shogo82148"><code>@​shogo82148</code></a> made their first contribution in <a href="https://redirect.github.com/gorilla/mux/pull/725">gorilla/mux#725</a></li>
<li><a href="https://github.com/soheilrt"><code>@​soheilrt</code></a> made their first contribution in <a href="https://redirect.github.com/gorilla/mux/pull/712">gorilla/mux#712</a></li>
<li><a href="https://github.com/andrew-werdna"><code>@​andrew-werdna</code></a> made their first contribution in <a href="https://redirect.github.com/gorilla/mux/pull/672">gorilla/mux#672</a></li>
<li><a href="https://github.com/sumanpaikdev"><code>@​sumanpaikdev</code></a> made their first contribution in <a href="https://redirect.github.com/gorilla/mux/pull/708">gorilla/mux#708</a></li>
<li><a href="https://github.com/eh-steve"><code>@​eh-steve</code></a> made their first contribution in <a href="https://redirect.github.com/gorilla/mux/pull/676">gorilla/mux#676</a></li>
<li><a href="https://github.com/sy9"><code>@​sy9</code></a> made their first contribution in <a href="https://redirect.github.com/gorilla/mux/pull/733">gorilla/mux#733</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/gorilla/mux/compare/v1.8.0...v1.8.1">https://github.com/gorilla/mux/compare/v1.8.0...v1.8.1</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/gorilla/mux/commit/b4617d0b9670ad14039b2739167fd35a60f557c5"><code>b4617d0</code></a> update GitHub workflows (<a href="https://redirect.github.com/gorilla/mux/issues/734">#734</a>)</li>
<li><a href="https://github.com/gorilla/mux/commit/3401478badc7aa55470bc806ee8cd185a16f9298"><code>3401478</code></a> fix SPA handler in README.md (<a href="https://redirect.github.com/gorilla/mux/issues/733">#733</a>)</li>
<li><a href="https://github.com/gorilla/mux/commit/4a671cbc5162efa2ecb1b353e6a704a62737d66c"><code>4a671cb</code></a> Add GetVarNames() (<a href="https://redirect.github.com/gorilla/mux/issues/676">#676</a>)</li>
<li><a href="https://github.com/gorilla/mux/commit/85123bf20e069b156415b871dea10517f6a8938a"><code>85123bf</code></a> changed the routeVariables text content. (<a href="https://redirect.github.com/gorilla/mux/issues/708">#708</a>)</li>
<li><a href="https://github.com/gorilla/mux/commit/79f2f457ca5017e08de9f86ada03939a82dbf714"><code>79f2f45</code></a> Clarify documentation examples of Route methods (<a href="https://redirect.github.com/gorilla/mux/issues/672">#672</a>)</li>
<li><a href="https://github.com/gorilla/mux/commit/395ad81d0ebffa0c5a36f3e5a2e720a7d5870d92"><code>395ad81</code></a> [BUG] Inconsistent HTTP status code on query mismatch (<a href="https://redirect.github.com/gorilla/mux/issues/712">#712</a>)</li>
<li><a href="https://github.com/gorilla/mux/commit/24c3e7f499efd8b1429cfe789c7e6a3631357045"><code>24c3e7f</code></a> Fix  <code>Single Page Application</code> example in <code>README.md</code> file (<a href="https://redirect.github.com/gorilla/mux/issues/678">#678</a>)</li>
<li><a href="https://github.com/gorilla/mux/commit/546dd0cc9f3ecdef8b065ac6336b4c6ed99887d4"><code>546dd0c</code></a> run go fmt with Go 1.20 (<a href="https://redirect.github.com/gorilla/mux/issues/725">#725</a>)</li>
<li><a href="https://github.com/gorilla/mux/commit/651928c42f7b60c7942e46d5f651dd1ece444246"><code>651928c</code></a> Update issues.yml (<a href="https://redirect.github.com/gorilla/mux/issues/727">#727</a>)</li>
<li><a href="https://github.com/gorilla/mux/commit/cfc696d6d239ff68ceb71ee35c9a4e4ef3f30ed9"><code>cfc696d</code></a> Update issues.yml (<a href="https://redirect.github.com/gorilla/mux/issues/726">#726</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/gorilla/mux/compare/v1.8.0...v1.8.1">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/gorilla/mux&package-manager=go_modules&previous-version=1.8.0&new-version=1.8.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants