After upgraded to go_appengine SDK version 1.9.54, I always get following warning, even just one or two .go files are used in the app directory. As a result, file changes are not automatically detected and app is not rebuilt.
$ goapp serve
go_appengine-1.9.54/google/appengine/tools/devappserver2/mtime_file_watcher.py:182: UserWarning: There are too many files in your application for changes in all of them to be monitored. You may have to restart the development server to see some changes to your files. 'There are too many files in your application for '
Any ideas?
I solved this issue by using vendor/
directory for large package sources used in my project, such golang.org
or google.golang.org
repositories. Using devappserver2.py
via $ goapp serve
, file changes in vendor directories are ignored. Works for go version 1.6 >
In my case, this problem occured, when I have a mixed content in the parent directory, including npm project and node_modules
directory.To solve the problem, I changed _IGNORED_PREFIX
variable in go_appengine/google/appengine/tools/devappserver2/watcher_common.py
file as following:
Line 24: _IGNORED_PREFIX = ('.', 'node_modules')
Using appengine-1.9.57.
A corresponding error occurs when the file under the "$GOPATH" directory is subject to file monitoring and the number of files is large. In my case, by specifying "vendor" or a project with many files in "skip_files" option of "app.yaml", I was able to prevent the corresponding error from occurring.
https://cloud.google.com/appengine/docs/standard/python/config/appref#skip_files
skip_files:
- .*node_modules
- .*vendor
- .*project-name-having-too-many-files