Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

Errors - accept4: too many open files #717

Closed
pinootto opened this issue Oct 5, 2017 · 4 comments
Closed

Errors - accept4: too many open files #717

pinootto opened this issue Oct 5, 2017 · 4 comments

Comments

@pinootto
Copy link

pinootto commented Oct 5, 2017

Hello,

I installed OpenBazaar 2.0 beta on a VPS.

It seems to work, but in the log I see a lot of the following errors:

2017/10/05 05:39:30 http: Accept error: accept tcp4 0.0.0.0:9005: accept4: too many open files; retrying in 1s
2017/10/05 05:39:30 http: Accept error: accept tcp4 45.32.115.191:4002: accept4: too many open files; retrying in 1s
2017/10/05 05:39:30 http: Accept error: accept tcp6 [::]:9005: accept4: too many open files; retrying in 1s
2017/10/05 05:39:31 http: Accept error: accept tcp4 0.0.0.0:9005: accept4: too many open files; retrying in 1s
2017/10/05 05:39:31 http: Accept error: accept tcp4 45.32.115.191:4002: accept4: too many open files; retrying in 1s
2017/10/05 05:39:31 http: Accept error: accept tcp6 [::]:9005: accept4: too many open files; retrying in 1s
2017/10/05 05:39:32 http: Accept error: accept tcp4 0.0.0.0:9005: accept4: too many open files; retrying in 1s
2017/10/05 05:39:32 http: Accept error: accept tcp4 45.32.115.191:4002: accept4: too many open files; retrying in 1s
2017/10/05 05:39:32 http: Accept error: accept tcp6 [::]:9005: accept4: too many open files; retrying in 1s
2017/10/05 05:39:33 http: Accept error: accept tcp4 0.0.0.0:9005: accept4: too many open files; retrying in 1s
2017/10/05 05:39:33 http: Accept error: accept tcp4 45.32.115.191:4002: accept4: too many open files; retrying in 1s
2017/10/05 05:39:33 http: Accept error: accept tcp6 [::]:9005: accept4: too many open files; retrying in 1s
2017/10/05 05:39:34 http: Accept error: accept tcp4 0.0.0.0:9005: accept4: too many open files; retrying in 1s
2017/10/05 05:39:34 http: Accept error: accept tcp4 45.32.115.191:4002: accept4: too many open files; retrying in 1s
2017/10/05 05:39:34 http: Accept error: accept tcp6 [::]:9005: accept4: too many open files; retrying in 1s

How can I do?

Best regards
giovanni

@hoffmabc
Copy link
Member

hoffmabc commented Oct 5, 2017

This is a pretty common error related to the VPS probably only allowing so many files to be opened by a process and since the peer to peer IPFS code opens many connections (each a file) it can overwhelm that limit quickly.

See: https://ubuntuforums.org/showthread.php?t=2315142

@pinootto
Copy link
Author

pinootto commented Oct 5, 2017

Thank you, Brian.

I fixed the issue by increasing the limit for the number of open files.

In addition to your link, I also found this useful link:
https://easyengine.io/tutorials/linux/increase-open-files-limit/

I used the "Per-User Limit" solution, without the need to reboot the VPS.

I am a big fan of IPFS and OpenBazaar (actually all the decentralized systems).
I am sure that OpenBazaar will spread a lot and it will be very popular in the next few years.

Thank you for the awesome work!

@cpacia
Copy link
Member

cpacia commented Oct 5, 2017

Just merged a PR to automatically raise the file descriptor limit which seems to be working. Hopefully we'll be able to put this issue behind us.

@pinootto
Copy link
Author

pinootto commented Oct 6, 2017

Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants