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

server stops accepting new connections #221

Open
dktr0 opened this issue Feb 21, 2023 · 2 comments
Open

server stops accepting new connections #221

dktr0 opened this issue Feb 21, 2023 · 2 comments

Comments

@dktr0
Copy link
Owner

dktr0 commented Feb 21, 2023

This log message that appears a few minutes before last accepted connection is probably relevant: "Network.Socket.accept: resource exhausted (Too many open files)"

In which case, this discussion on an another project is probably relevant: PostgREST/postgrest#2042

@dktr0
Copy link
Owner Author

dktr0 commented Feb 21, 2023

This is a useful Linux command for seeing how many files a process has open: sudo ls -lah /proc/PID/fd

The Haskell module System.Posix.Resource has functionality for querying this from within the server application itself: https://hackage.haskell.org/package/unix-2.8.0.0/docs/System-Posix-Resource.html

@dktr0
Copy link
Owner Author

dktr0 commented Feb 21, 2023

Actually System.Posix.Resource seems to only provide functionality for querying the limits of open files, not the current number of open files...

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

1 participant