Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OSError: [Errno 28] inotify watch limit reached

I am making a python-based web app using Streamlit. After deploying it in Heroku, the build succeeds but there is an application error. I don't have any idea where in the source code this error is being generated. Please help me! The error :

2022-07-18T18:55:37.985429+00:00 app[web.1]:     Inotify._raise_error()
2022-07-18T18:55:37.985439+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.10/site-packages/watchdog/observers/inotify_c.py", line 398, in _raise_error
2022-07-18T18:55:37.985636+00:00 app[web.1]:     raise OSError(errno.ENOSPC, "inotify watch limit reached")
2022-07-18T18:55:37.985677+00:00 app[web.1]: OSError: [Errno 28] inotify watch limit reached
2022-07-18T18:55:38.387667+00:00 heroku[web.1]: Process exited with status 1
2022-07-18T18:55:38.510041+00:00 heroku[web.1]: State changed from starting to crashed
2022-07-18T18:55:48.000000+00:00 app[api]: Build succeeded
2022-07-18T18:57:33.589417+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=invezto.herokuapp.com request_id=bc8f4556-852e-4dad-8b67-71e49ffaaf23 fwd="49.37.45.19" dyno= connect= service= status=503 bytes= protocol=https
2022-07-18T18:57:33.917128+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=invezto.herokuapp.com request_id=46e2e615-17dc-42f6-a86d-4dfc5fd5ecfc fwd="49.37.45.19" dyno= connect= service= status=503 bytes= protocol=https ``` 

 
like image 973
Jaggernaut Avatar asked Jan 31 '26 15:01

Jaggernaut


1 Answers

Adding option --server.fileWatcherType none at the command line helped me to resolve similar issue. A full example would look like this:

streamlit run app.py --server.fileWatcherType none

More solutions here

like image 131
sswt Avatar answered Feb 03 '26 06:02

sswt