0

I had issue with MDict which others or the developer of app can‘t reproduce.

I can't load more than 122 files as groups.

If i using more than 122 dict files, app can't show, it shows fail to open file. The files not corrupt, all of them works for others and developer.

The issue only when loading all files together as group.

I reinstalled new macos, issue doesn't solve it.

Here is log file of app: Should be normal way;

Found dictionary:/Users/**/Downloads/pro/****, added to list

Open file failed, reason:No such file or directory
Open file failed, reason:No such file or directory
Open file failed, reason:Too many open files
Open file failed, reason:Too many open files
Fail to load dict:/Users/**/Downloads/pro/*****, Error:Fail to open file

Files is ok, if i opened only one file is ok. I appreciate for helping.

  • Hi Shawky, welcome to Ask Different. Have you contacted the developer of the app for help? Which app is it? What does it do? The error messages "No such file or directory" point to missing files, could that be the problem? – jaume Jun 28 at 15:21
  • My college tested app, with same file and more 370 files, it is works like charm with him. – Shawky Jun 28 at 23:26
  • What is the result of sysctl kern.maxfiles kern.maxfilesperproc? Are there other applications running which open a lot of files? Is the problem the same if you run the application immediately after a reboot? If you create a new user account on your Mac and try there, does it happen as well? – nohillside Jun 29 at 6:52
  • Hi Nohillside, No other apps running, i created new user account, even i tried re-install new MacOS. My system now is new, doesn’t install any thing except this app. – Shawky Jun 29 at 7:57
  • kern.maxfiles: 98304 kern.maxfilesperproc: 49152 – Shawky Jun 29 at 8:00
0

First solution to test:

The developer of App found the solution.

This is temporary Solution. Problem cause of apply system limit open file.

sudo launchctl limit maxfiles 65536 200000

More detail here: Maximum limits (macOS etc.)

Newer versions of macOS do not reference the file due to security considerations.


The best solution:

ref: https://wilsonmar.github.io/maximum-limits/

  1. Download this two file: https://github.com/wilsonmar/mac-setup/blob/master/configs/limit.maxfiles.plist

https://github.com/wilsonmar/mac-setup/blob/master/configs/limit.maxproc.plist

  1. Copy and Paste this two file in folder /Library/LaunchDaemons/
  2. In terminal write this code:
sudo launchctl load -w /Library/LaunchDaemons/limit.maxfiles.plist
sudo launchctl load -w /Library/LaunchDaemons/limit.maxproc.plist

Enter, will ask for user password.

  1. In terminal, write:
sudo ulimit -n 65536 200000
  1. Restart, i will work like a charm!
| improve this answer | |
New contributor
Shawky is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • You've posted this as a second answer. Which is fine in general, but as both answers cover the same solution, combining them into one might be better. – nohillside Jul 1 at 9:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .