Questions tagged [file-descriptors]
27 questions
25
votes
2 answers
Why does password entering work in a piped sudo command?
If I do:
sudo cat /etc/resolv.conf | less
It will prompt me for the password, even though less (presumably) takes stdin. Over what fd's is the password prompt shown and how does it get the input back?

Karel
- 639
- 9
- 16
23
votes
3 answers
Too many open files with nginx, can't seem to raise limit
The server is Ubuntu 13.04 (GNU/Linux 3.9.3-x86_64-linode33 x86_64).
nginx is nginx/1.2.6.
I've been working on this for an several hours now, so here's what I'm getting and here's what I've done.
tail -f /usr/local/nginx/logs/error.log
2013/06/18…

Geuis
- 637
- 3
- 8
- 20
18
votes
1 answer
Ubuntu 16.04 Server MySql open_file_limit won't go higher than 65536
I'm running Ubuntu 16.04 Server on XenServer and I'm running into an issue with MySql's open file limit.
Here's what I've done so far:
sudo nano /etc/security/limits.conf (reference)
* soft nofile 1024000
* hard nofile 1024000
* soft nproc 102400
*…

J Pierret
- 181
- 1
- 1
- 6
13
votes
2 answers
Number of file descriptors: different between /proc/sys/fs/file-nr and /proc/$pid/fd?
I would like to check how many file descriptors are actually used:
cat /proc/sys/fs/file-nr
12750 0 753795
The first column (12750) indicates the number of file descriptors allocated since boot.
I would like to know why the number from the…

HTF
- 3,148
- 14
- 52
- 82
8
votes
2 answers
How to permanently increase RabbitMQ file descriptors limit
I'm trying to permanently increase the RabbitMQ file descriptors limit.
I've already increased the system limit to 65535 and did the same for the RabbitMQ process by adding an entry to the /etc/security/limits.d/rabbitmq.conf file.
Output of ulimit…

Francesco Casula
- 183
- 1
- 1
- 7
6
votes
1 answer
strace shows long time reading from mysql socket - mysql takes long time to execute query?
My Apache server takes long time to process request. I attached strace to it and can see the two following delays:
1) Very critical (143 seconds to process)
1335 0.000037 write(16, "\235\0\0\0\3INSERT INTO `br_anonymous_user_tokens`…

Max Koretskyi
- 767
- 1
- 8
- 16
5
votes
1 answer
Squid running out of filedescriptors on CentOS 7
I'm running Squid 3.3 (EPEL) on CentOS 7 and recently I have been getting the following error message in my cache.log
WARNING! Your cache is running out of filedescriptors
I am slightly confused by this because I seem to have ample descriptors…

James White
- 674
- 3
- 18
- 32
3
votes
2 answers
Why does writing to the console a process's STDIN is attached to doesn't send input to the application itself?
Taken from this answer:
Terminal 1:
[ciupicri@hermes ~]$ cat
shows on the tty but bypasses cat
Terminal 2:
[ciupicri@hermes ~]$ pidof cat
7417
[ciupicri@hermes ~]$ echo "shows on the tty but bypasses cat" > /proc/7417/fd/0
I don't quite understand…

sherlock
- 141
- 5
3
votes
1 answer
Mongodb error - Out of file descriptors. Waiting one second before trying to accept more connections
Details
Here is what I see in the logs file
2014-09-08T10:22:43.143+0000 [initandlisten] ERROR: Out of file descriptors. Waiting one second before trying to accept more connections.
2014-09-08T10:22:43.360+0000 [conn9206] Assertion: 12520:new file…

abipc87
- 133
- 1
- 4
3
votes
0 answers
uwsgi through supervisor too many open files
I have uWSGI set up through supervisor on a ubuntu 12.04 box and lately I noticed that when trying to tail the logs (all the logs in that user account) I get message that too many files opened , uWSGI is running as a not root user, I changed the…

APZ
- 954
- 2
- 12
- 25
2
votes
1 answer
using named-pipes to control a remote ssh session in BASH
My question is mostly based on this
https://stackoverflow.com/questions/22479631/pipe-timely-commands-to-ssh?rq=1
I am following above question and I am able to connect to a server, like this:
mkfifo CMDs.txt
exec 7> CMDs.txt
then from another…

Ibraheem
- 23
- 1
- 6
2
votes
2 answers
Dangers of closing file descriptors
In the Stack Overflow question Check if a program exists from a bash script the accepted answer notes that closing stderr is dangerous:
(minor side-note: some will suggest 2>&- is the same 2>/dev/null but shorter - this is untrue. 2>&- closes FD 2…

Mark C
- 123
- 4
2
votes
1 answer
How to set up a global CustomLog on Apache2 for every virtualhost
Actually I got some issue with file descriptors on Debian Wheezy with 3.2.13 kernel and Apache/2.2.16.
I would like to reduce this limit, actually each virtualhost got a CustomLog and an ErrorLog, I want to set up only one CustomLog and one ErrorLog…

Maxence
- 197
- 1
- 1
- 13
2
votes
1 answer
Tuning tcp_keepalive_time for Node.js leak
I'm currently having a socket leak with my Node.js application.
This bug is also posted here.
I hope to fix this soon. CLOSE_WAIT and FIN_WAIT2 seem to be the major problem.
Connections: 1662
ESTABLISHED: 238
CLOSE_WAIT: 770
FIN_WAIT1: …

Martin
- 177
- 2
- 10
2
votes
1 answer
Why does xinetd try to close file descriptors on startup?
I have xinetd running inside a docker container (base image centos:7) on a rockylinux 9 host machine.
On starting xinetd service in the docker image, it appears to hang. So I used strace, and found the following output, rapidly counting…

MirroredFate
- 459
- 5
- 9