logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: why over 40k open files on low use server
Author
apachenaut



Joined: 13 Nov 2019
Posts: 4
Location: USA

PostPosted: Wed 13 Nov '19 21:17    Post subject: why over 40k open files on low use server Reply with quote

Hello forum,

I have been using apache for ages and just recently am using it on my first Amazon Web Services Fedora 30 instance with apache version 2.4.41.
I notice httpd has over 40k open files.
This server is hosting roundcube email for only a dozen or so users. The last server, Fedora 23 with apache version 2.4.18, only had about 16k

I searched the internet and all I find is how to raise the limit on open files. I would rather find out why there are so many and reduce them.

I expect usage on this server to grow and I would like to eliminate a potential problem.

Thanks in advance
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7288
Location: Germany, Next to Hamburg

PostPosted: Thu 14 Nov '19 16:42    Post subject: Reply with quote

This could have many reasons why it is the way it is.

Do you have the same Apache config? Including MPM settings?

Is your MySQL config the same?
Back to top
apachenaut



Joined: 13 Nov 2019
Posts: 4
Location: USA

PostPosted: Thu 14 Nov '19 17:03    Post subject: Reply with quote

apache and mysql settings are the same.
MPM settings must be the same since I don't know what MPM settings are and so have not messed with them.
Are there any investigative procedures I can use to determine the cause of so many open files?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7288
Location: Germany, Next to Hamburg

PostPosted: Fri 15 Nov '19 11:27    Post subject: Reply with quote

apachenaut wrote:
apache and mysql settings are the same.
MPM settings must be the same since I don't know what MPM settings are and so have not messed with them.
Are there any investigative procedures I can use to determine the cause of so many open files?


Did you copy the configuration from one server to the other or do you use the the default settings and copied only the vhosts?

Take a look at https://linuxaria.com/article/open-files-in-linux
Back to top
apachenaut



Joined: 13 Nov 2019
Posts: 4
Location: USA

PostPosted: Fri 15 Nov '19 17:25    Post subject: Reply with quote

I only copied the vhosts during the move.

The link you provided is like all the rest I have seen. It only suggests raising the limit to allow even more open files rather than solving the problem and figuring out why there are so many.

apache is currently using 42k open files on a web server with roundcube mail and only a dozen or so users. The previous server used around 16k, which was no cause for alarm.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7288
Location: Germany, Next to Hamburg

PostPosted: Fri 15 Nov '19 22:51    Post subject: Reply with quote

That is partly correct for the link. But I was referring to the first part. Finding out which process has so many files open. I guess you should figure that out, before taking action on apache and or mysql and or php.
Back to top
apachenaut



Joined: 13 Nov 2019
Posts: 4
Location: USA

PostPosted: Fri 15 Nov '19 23:52    Post subject: Reply with quote

As I have mentioned in two different posts, apache IS the source of the files. There is nowhere else to check but apache. Looking at the open files there are hundreds of PIDs, all belonging to httpd.

This is the apache forum and I am hoping to get advice about apache. There is nothing on the internet about this issue. There is nowhere else to go to get advice about this issue.
Back to top


Reply to topic   Topic: why over 40k open files on low use server View previous topic :: View next topic
Post new topic   Forum Index -> Apache