[SOLVED] "bash: fork: Resource temporarily unavailable" now occurring, did not before
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
"bash: fork: Resource temporarily unavailable" now occurring, did not before
On a website I support (unpaid, a volunteer for an environmental organization) webcams upload images via ftp. I wrote a small app that detects every new image using inotify; it creates a thumbnail of the new image and archives the old image. At the moment we have 3 webcams so I run 3 instances of it. It has worked well for 5 years.
The host recently moved us to a new set of IPs, allegedly for security purposes. At the same time it changed the volume structure of the hard drive. At the same time it changed the owner and group of the httpd processes without telling us. (I suspect it restored the defaults.)
This forced us to figure out why webcams and the thumbnail app and some other external users weren't working.
After I sorted out the ownership problem a weird thing happens. When I run more than one instance of the thumbnail app all instances stop working, nothing gets written to the log.
I can't do anything as that user, not even ls or pwd; when I try I get
"bash: fork: Resource temporarily unavailable"
multiple times.
When I run 3 instances of the app I get a bunch of those then:
"bash: cannot make pipe for command substitution: Too many open files "
lsof shows only 324 files open for that user (I run as root to do this), only a fraction of them related to the thumbnailer.
Sounds like the limits (see also ulimit) have been reverted.
Unfortunately, on Linux the defaults are set in various places eg /etc/security/limits.conf, /etc/security/limits.d (dir) and can be overridden by setting the same vars in the various login files eg /etc/profile, /etc/bashrc, & personal versions thereof.
See the discussion http://www.linuxquestions.org/questi...e-from-866550/ where I found out the hard way...
See cmd defn http://linux.die.net/man/1/bash
I'd definitely complain to your host.
Changing IPs is one thing (although I fail to see the security reason), but messing with your OS (or apps/data) is definitely not on
I suppose it will encourage you to setup a comprehensive backup procedure & use it
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.