LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 04-17-2013, 09:18 PM   #1
RandomTroll
Senior Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 1,394

Rep: Reputation: 235Reputation: 235Reputation: 235
"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.

Any idea what this is?
 
Old 04-17-2013, 10:54 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 7.7 (?), Centos 8.1
Posts: 17,767

Rep: Reputation: 2535Reputation: 2535Reputation: 2535Reputation: 2535Reputation: 2535Reputation: 2535Reputation: 2535Reputation: 2535Reputation: 2535Reputation: 2535Reputation: 2535
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
 
1 members found this post helpful.
Old 04-18-2013, 03:13 PM   #3
RandomTroll
Senior Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 1,394

Original Poster
Rep: Reputation: 235Reputation: 235Reputation: 235
Yep: that was it. Annoyingly it's set in 3 places: /etc/profile, /etc/bashrc, /etc/profile.d/limits.sh. I had to change all 3 of them.

Thanks.
 
Old 04-18-2013, 07:56 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 7.7 (?), Centos 8.1
Posts: 17,767

Rep: Reputation: 2535Reputation: 2535Reputation: 2535Reputation: 2535Reputation: 2535Reputation: 2535Reputation: 2535Reputation: 2535Reputation: 2535Reputation: 2535Reputation: 2535
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Default bash: fork: Resource temporarily unavailable :SSH LittleMaster Linux - Server 3 03-13-2013 09:32 PM
[SOLVED] "resource temporarily unavailable" in recv in socket programming mrjmrj Programming 7 02-21-2013 04:01 AM
"fatal IO error 11 (Resource temporarily unavailable) on X server" with two windows 10_GOTO_10 Linux - Software 0 08-05-2011 02:44 PM
"fork: Resource temporarily unavailable" for certain user yoachan Linux - Server 6 01-06-2010 08:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration