I
I
Ilya2016-05-23 22:22:10
Apache HTTP Server
Ilya, 2016-05-23 22:22:10

How to increase the limit of open files from Apache?

Hello!
Warnings and errors appeared in the Apache log of the following nature:

PHP Warning: require_once: failed to open stream: Too many open files

I started trying to increase the allowed number of files to open.
In /etc/sysctl.conf :
fs.file-max = 100000

In /etc/security/limits.conf :
* soft nproc 65535
* hard nproc 65535
* soft nofile 65535
* hard nofile 65535

Impersonating an apache user , requesting active limits:
su apache -s /bin/sh
ulimit -a
...
open files (-n) 65535
...

But looking at the httpd process limits I get the following:
cat /proc/5346/limits
...
Max open files 1024
...

Therefore, my previous manipulations are useless. Tried enough of everything.
I would be very, very grateful! I've been scratching my head and dirtying magazines for a long time.
CentOS 7.2
Apache 2.4

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
ldv, 2016-05-23
Hrebet @hrebet

serverfault.com/questions/628610/increasing-nproc-...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question