LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 07-28-2016, 06:39 PM   #1
julian16
LQ Newbie
 
Registered: Aug 2009
Posts: 20

Rep: Reputation: 0
"file descriptors" problem on RedHat 7


I got an interesting case on our RedHat 7 system: often the apache web server fails on its CGI processes with errors like:

AH01215: Error in tempfile() using template /tmp/XXXXXXXXXX:
Could not create temp file /tmp/89R0x3Dl7D

(“drwxrwxrwt. 7 root root 4096 Jul 28 13:02 /tmp”)

With hints from Googling the error I “bring it back” by restart the Apache web server (then apache/CGI resumes normal work). The problem is that I have to restart the apache so often.

The output from “lsof | wc –l” shows it has 19107. This number seems too high? (on my other servers this is like 550 and 3620 respectively. I don’t know much about “file descriptors” and wonder is there anything unusual on the system that I should correct before looking at the options to increase the upper limits?
 
Old 07-29-2016, 02:04 AM   #2
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
Are you using fastcgi? Your CGIs probably need to be better at closing their files, and exiting.
 
Old 07-29-2016, 12:14 PM   #3
julian16
LQ Newbie
 
Registered: Aug 2009
Posts: 20

Original Poster
Rep: Reputation: 0
That's a good thought. We do have many perl/CGI (not fast CGI). However there may be odds but to close file HANDLES and to "exit 0" at the end of each script is our standard practice. The same set of CGI scripts work fine for years, and still working fine, on our old server (RedHat 6; We are migrating to the new server with RedHat 7).

Any hint to further diagnose/correct would be appreciated.

j
 
Old 07-29-2016, 12:30 PM   #4
julian16
LQ Newbie
 
Registered: Aug 2009
Posts: 20

Original Poster
Rep: Reputation: 0
Dumb on me. Just tried a

awk '{print $1}' lsof.output | awk 'FS="/"{print $1}' | sort | uniq -c"

and found the trouble maker that creates tons of open files. Will pursue that direction.

j
 
Old 07-29-2016, 03:32 PM   #5
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: Slackware®
Posts: 13,923
Blog Entries: 44

Rep: Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158
Moderator response

Moved: This thread is more suitable in <Red Hat> and has been moved accordingly to help your thread/question get the exposure it deserves.
 
  


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
file descriptors in Perl-----I need to use gpg's "--passphrase-fd n" option Rain Duck Programming 5 02-25-2011 09:52 AM
[SOLVED] "Group Descriptors Corrupted" Problem and Urgent Help Needed ! tnl Linux - Software 20 07-07-2009 08:35 AM
"Group Descriptors Corrupted" Problem and Urgent Help Needed ! tnl Linux - Kernel 2 07-03-2009 07:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 06:50 PM.

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
Open Source Consulting | Domain Registration