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
thread 'main' panicked at 'Unable to open cache file!: Os { code: 24, kind: Other, message: "Too many open files" }', src/platforms.rs:37:53 #12
Comments
Hello @gprime31, Can I know what's the command you used while you got this error message? Are you using the project's in-built mechanism to load the file (i.e. using the -f flag), or are you using some sort of technique that depends on the system/shell you are running on? I couldn't reproduce the issue with the project's in-built file loading mechanism (I tried with files containing hundreds and thousands of hostnames), so please let me know how you landed up on this error message, as that would help me out in understanding this issue well, before coming up with a fix. Thanks, |
NtHiM -f subs.txt -o results.txt |
OS is ubuntu and zsh for shell |
Hi there, Can you please try using the verbose (-v) flag to check for the non-resolving hostnames? By default, non-resolving ones aren't shown in the output, so I would like to know if it really hangs or at least displays an immediate output in verbose mode for such hostnames? Till then, I'm looking up on your major issue, thanks for providing all the environment details! 😇😇 Thanks, |
Also, can you please try changing the value of system-wide kernel directives for maximum number of open files? But, before doing so, I'd love to know what your current limit is (use Here's a sample command if you would like to try changing the limit (put limit higher than existing): sysctl -w fs.file-max=809600 Please let me know if this solves your issue, so that I could work on this issue further! |
I have ran tools that take 100's of subs as stdin and never ran into this problem, so don't really want to change os configs. |
also the hanging on .cn sites, I let it run over night and it didn't crash this time but it's taking forever. |
but I used to run this https://github.com/LukaSikic/subzy for subtakeover. |
oh and for the verbose: |
Hi there, Thanks for providing all of the information, and also thanks for the suggestion on that new ability! I will be working on the two flags you mentioned (i.e. max-retries and timeout). I am still working on the major issue you are facing, regarding the file opening thing. I will put up any information or fixes here in the comments if I am able to confirm. Thanks, |
…ormance boost! (Complete Resolution to the issue #12) - Defined implementations on "Definition" and "Response" structs, - Defined a "_getPlatformName()" method within the "Response" struct, - Change the workflow of the "_platforms()" function, in order to simply return the signatures definitions, - PERFORMANCE BOOST: Implemented a "_findPlatformName()" function, which calls the "_platforms()" function just once throughout the runtime, which leads to the signatures file being read just once (previously, it was reading the file every time for every single hostname)!
Hello @gprime31, The new release of NtHiM, i.e. v0.1.4, is published now, which includes both of the things you mentioned here:
I hope you would test these functionalities in the new version of NtHiM. Thanks, |
Works great now!!! Thanks |
Hello @gprime31, Thank you for your review on the new release! I feel really good to hear that it is working fine now. Also, thanks for letting me know that you had to update Rust to compile from source! I will surely include that in the installation instructions portion in the documentation for NtHiM, as you have mentioned in your issue #21. Thanks, |
thread 'main' panicked at 'Unable to open cache file!: Os { code: 24, kind: Other, message: "Too many open files" }', src/platforms.rs:37:53
when 100+ subs in a file.
The text was updated successfully, but these errors were encountered: