Created
November 7, 2017 08:06
-
-
Save mironal/cb5dbd361d58fb487361834e60e7e2a0 to your computer and use it in GitHub Desktop.
A test to generate "Too many open files" error.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #test_fd.rb:4:in `initialize': Too many open files in system @ rb_sysopen - 5053.test (Errno::ENFILE) | |
| files = [] | |
| 1.step do |i| | |
| file = File.open("#{i}.test", "w") | |
| files << file | |
| puts "#{i} => fileno: #{file.fileno}" | |
| end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment