I deployed a node application with following libreoffice buildpack: https://elements.heroku.com/buildpacks/bluetealondon/heroku-buildpack-libreoffice-for-heroku-18
But while my application tries to start on Heroku, it spits out following error:
Internal watch failed: ENOSPC: System limit for number of file watchers reached, watch '/app/vendor/libreoffice/usr/share/icons/hicolor/32x32/mimetypes/libreoffice6.4-presentation-template.svg'
Obviously I found that I need to increase the limit, but on Heroku I don't have sudo access.
My question is now, how can I fix this? Because I need the Libreoffice buildpack for my application.
Related
I installed an application using heroku's multibuilds (laravel and nodejs(socket.io)) more when I try to run the node server inside it gives the error. Can someone help me?
shows the error: [nodemon] Internal watch failed: ENOSPC: System limit for number of file watchers reached, watch '/app/vendor/laravel/framework/src/Illuminate/Session/SessionServiceProvider.php'
Number of files monitored by the system has reached its limit.
Check current value:
sysctl -a | grep inotify.max_user_watches
Than increase this limit. My value is 8192. I want to double:
sudo sysctl -w fs.inotify.max_user_watches=16384
Error gone.
I have a pm2 server which, with no apparent reason, restarts every time someone is uploading a file to the server, no matter the size of the file.
I tried increasing the --max-memory-restart to 2048M
What should I do?
Di you see the logs on the server? With pm2 you can see all the errors in the log file that are happening. Try to review the logs file and try to be more specific next time.
I'm trying to git push my app up to Openshift. I get the following error:
Stopping Node.js application...
Warning: Gear 575efb722d5271dec00000f4 is using 100.0% of inodes allowed
Failed to execute: 'control stop' for /var/lib/openshift/575efb722d5271dec00000f4/nodej
I don't know what this means. What are inodes? I found no help on Openshift help. I checked the space quota for my gear and I'm at 60%. What does this mean?
If this is any clue, I recently downloaded a few babel files so I can start to use async/await in my node app.
Anybody?
Meteor 1.3 was released a few days ago.
Deployment using cf push of Meteor 1.3 apps to IBM Bluemix may fail with ENOSPC error. It appears that only simple Meteor 1.3 apps deploy successfully, as only after removing many packages or files (or creating a new app without adding many packages) it works.
ENOSPC means no space left or the number of files watched has reached the maximum allowed.
I think the latter may be the case. A solution for Node.JS apps is to increase the limit as described in Node.JS Error: ENOSPC:
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
However an attempt to use sudo in Bluemix returns
sudo: no tty present and no askpass program specified
A GitHub issue was created in the cf-meteor-buildpack repository that show a number of other people experiencing the same problem:
https://github.com/cloudfoundry-community/cf-meteor-buildpack/issues/20
How can Meteor 1.3 apps be successfully deployed to Bluemix?
Update:
I have found the point at which just adding one more package to the app and deploying it causes the ENOSPC error. Without that package, the app deploys and runs successfully and the total disk usage as shown in the Bluemix Dashboard is just 220.1 MB. The default disk quota is 1 GB, so there is actually plenty of free space left. Therefore it is likely that the error is caused by exceeding a maximum number of files, not the disk quota being reached.
Just to be sure, I increased the disk quota to 2 GB via Cloud Foundry's manifest.yml and the ENOSPC error still occurred when I added the extra package. Without the package, the disk usage is "220.1 MB / 2 GB" in the dashboard. That package (kadira:flow-router) is very unlikely to need 1.8 GB of space.
Meteor 1.3 creates many more files than previous versions because there is a new node-modules directory into which many individual Node.js modules are installed.
To check the value of max_user_watches, I added this line to the buildpack script:
cat /proc/sys/fs/inotify/max_user_watches
The result shown is 8192.
I then added this line to attempt to change the value:
echo 32768 > /proc/sys/fs/inotify/max_user_watches
The result is /proc/sys/fs/inotify/max_user_watches: Permission denied.
Is it possible to increase the maximum number of allowed file watches via Cloud Foundry? The operating system is Linux.
I'm trying to run a simple app on heroku. It doesn't use Flask at all, the script just needs to be run once and it will (or should) keep itself alive. It runs fine locally, it runs fine on my VPS. I really want to deploy it to heroku for the ease of maintenance/addons though. So I deployed it, made sure all the dependencies were installed, etc.
This is my Procfile:
web: newrelic-admin run-program python dragon.py
But when I try to run it, it will run fine for a few seconds before I get this error:
heroku/web.1: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
In those few seconds, it will even respond to commands (it's a chat bot), but inevitably fails with the failed to bind error. I've tried several solutions, such as adding $PORT to my procfile, and none of them worked. I tried using gunicorn and the app would run, but it wouldn't receive or respond to incoming commands.
I'm at a loss, does anyone know a surefire way to bind a port for a Python app NOT running Flask? I couldn't find any answers for anything that wasn't using Flask in some way, but adding Flask didn't appear to be working either. I just need this app to run as-is, but bind to a port so it will stay open.
This is a screenshot of my logs, showing the request/response headers, and even the first keepalive signal being sent by the app before it crashes.
http://puu.sh/h3Jo2/e689e9ba38.png
First edit: I contacted Heroku Support to get my boot timeout increased to 120 seconds. It still failed to bind to $PORT, despite running and working until it crashed. I also tried specifying a port in the config vars, to no avail. This is a screenshot of my logs showing failure to boot (twice) after 120 seconds: http://puu.sh/h4e4r/11c50a5ae7.png
Alright, I figured it out. I contacted support again and found out that I was using the wrong process type. I am now running it as a bot process, so my Procfile now looks like this:
bot: newrelic-admin run-program python dragon.py
This allows it to run without binding to a port.