It seems to be strange that problem miss in another server in ubuntu1804 tf222 docker container.
The only difference between the two devices is that the host system problem occurred is ubuntu 1804 and another is ubuntu 20. They are all using docker to manage python environment in the same images.
Cheerful!! I find a solution after nearly one year.
Other solution just change max_user_watches but not max_user_instances. We should change this config value in similar methods.
Change sysctl.conf in host machine not containers.
sudo nano /etc/sysctl.conf
Add fs.inotify.max_user_instances = 1100000 to the bottom of file and save changes.
Then use sudo sysctl -p to reload config.
It is really strange that I’m stuck for this tiny difference. Luckily it finally worked.
Thanks @seiriosPlus . I hit into the same problem deploying an app to heroku. I haven’t encountered the problem before with the app - hit into it after updating to streamlit 1.13 & python 3.9.15.
Your solution worked after all other suggestions failed (e.g. <1> can’t update the filesystem on heroku so not possible to update max_user_instances and max_user_watches; <2> Setting fileWatcherType = “none” in the [server] section of config.toml didn’t have any effect ).
This appears to be the product of something that VSCode was doing. Here are my comments.
This actually happened to me due to “opening folders” in Visual studio Code. Running on linux. When I started vscode with other streamlit python files open. Then started/Opened a folder project Python/Django from another directory within a larger code directory/repository. However it started adding all the files in the root folder to the watch list.
There are thousands of files in the root from other projects.
~notebooks/work/dev ~notebooks/personal/dev
Each with different projects in them.
The new django projects was ~notebooks/work/dev/djangoproject
Vscode was watching everything all the way down to ~notebooks
Streamlit would then complain. Something akin to too many open file handles.
It took a day or so to realize the culprit. I closed out the folder, and just opened the files from the other streamlit projects and it was fine from then on.
Yes, @Robert_Fleming is correct and is spot on to figuring out the root cause here. VS code eats up a lot of the watched file counts if you add too many folders to your workspace.
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.