hello dear Drupalers, good day!

You may wonder why i post with this subject: Too many open files error? - The long-term-issue of Drupal: a bug-review from 2007 to 2012

well i am pretty new - and i have terrible issues in installing drupal on a dedicated server (which is 6 years old ... sure thing) To begin with the begining:

During the installation process i have noticed several warnings (see below) Has anyone else been confronted with similar issues during the installation-process like this? Well all i found is that the issue may or may not hit performance issue (of the server),
The error is noted in several threads - to be frank - in many many threads - i have seen it in threads that report this bug for the past 5 years: (/from 2007 to 2012). Well this issues can be named the the long-term-bug, cant they!!?

In order to give all those who are faced with the same issue a little overview i collected all the threads i found:

see them here - well they report all the same!

Too many open files error?
Posted by nr152522 on April 16, 2007 at 2:57pm
http://drupal.org/node/136732

Too many open files error?
http://drupal.org/node/1231106
Posted by mistaparker on July 27, 2011 at 2:07pm

Server Performance Warning: Drupal & modules (ab)uses too many files !
Posted by ClearXS on June 13, 2010 at 1:09am
http://drupal.org/node/825990#comment-5440056


Avoid too many file_exists() calls during bootstrap
- with patch - not tested yet!
Posted by c960657 on March 25, 2010 at 1:02pm
http://drupal.org/node/752730#comment-5440100

Christian offered a patch see here: http://drupal.org/files/issues/file_exists-2.patch

his findings: This issue describes a change that may or may not yield a performance improvement. I would expect it to, but somehow it doesn't, or the improvement is tiny. Using Xdebug (on Windows) I noticed that file_exists() is the most expensive built-in PHP function measured as total time spent calling the function for all invocations in a single request. This is more time than is spent in e.g. DOStatement->execute(). During the bootstrap process, Drupal does a lot of file_exists() checks to verify that files are still where they are supposed to be according to {system}.filename.

Well and here we have another solution - with the subject Too many open files in includes/file.inc on line 888
Posted by muckermarc on May 27, 2009 at 12:05pm in the thread http://drupal.org/node/474152#comment-5440114

and another suggestion that was made - and some fixes: Too many open files [SOLVED] ulimit Didier mentioned that he found the solution. En français : http://didier.misson.net/blog/2009/07/06/failed-to-open-dir-too-many-ope... problem is a maximum open files limite PER users ! We add several web servers, so several new Apache2 VirtualHost... and Apache2 (www-data) reach the 1024 maximum open files...

you can check with "ulimit -a" or "ulimit -n" (default is maximum 1024 open files) you can modify with "ulimit -n 1500" ... but it will be lost after reboot...To permanently made the modification, add in the file /etc/security/limits.conf :

$ vi /etc/security/limits.conf
#<domain> <type> <item> <value>
#
www-data soft nofile 1600
www-data hard nofile 65535

And of course, restart your web server Apache2 or other.
;-)
So, it was not a Drupal problem, nor a PHP problem...
but I think it's important that Drupal users know how to correct this problem.

Well i have the same issue here:

i am pretty new to drupal and also [pretty] new to this forum - so do not bear with me. Sorry for the newbie-questions... or just visit the site - http://campus-24.com/?q=stream and http://campus-24.com/ to get a first glance of what happened. with the installation of drupal-commons. Here the full story! after strugglin several weeks with drupal-commons 6.2.3 (based o november 2011) with issues on htaccess (my admin added and choose some certain options) i finally was able to install the system on the webserver.

Note - yesterday i installed on the local lamp with ease - all went nice and no error at all appeared.
Well today - the drupal-commons was installable on the webserver as well - Note: i gote some errors -which were reported during the intallation - (at each station of installation i got some lines like shown below)
But - nonetheless the installation-process was continued and fulfilled - i was able to choose all options and configuration-steps. Interesting detail: There were onle 149 tables been created - not 154 like yesterday on the local installation. !?! Interesting - isnt it?!

besides this - the result looks abit funny - what do you think - what can i do with that - can i fix it!?

have a closer look: http://campus-24.com/install.php?locale=&profile=drupal_commons&id=2&op=...
http://campus-24.com/?q=stream
http://campus-24.com/

but it should look like that of course like so:

http://commons.acquia.com/stream
or so http://commons.acquia.com

Question: is this a minor bug - or what can we do here -

btw - see the error reports that shown up during the installation - process. (well nonetheless all went without any break or interruption )

love to hear from you

greetings
unleash

error reports:

    warning: opendir(profiles/drupal_commons/modules/acquia/acquia_search/acquia_search/tests) [function.opendir]: failed to open dir: Too many open files in /home/vhost/WWW/campus-24.com/includes/file.inc on line 955.
    warning: opendir(profiles/drupal_commons/modules/acquia/acquia_search/apachesolr/Zend) [function.opendir]: failed to open dir: Too many open files in /home/vhost/WWW/campus-24.com/includes/file.inc on line 955.
    warning: opendir(profiles/drupal_commons/modules/acquia/acquia_search/apachesolr/tests) [function.opendir]: failed to open dir: Too many open files in /home/vhost/WWW/campus-24.com/includes/file.inc on line 955.
    warning: opendir(profiles/drupal_commons/modules/acquia/acquia_search/apachesolr/contrib) [function.opendir]: failed to open dir: Too many open files in /home/vhost/WWW/campus-24.com/includes/file.inc on line 955.
    warning: opendir(profiles/drupal_commons/modules/acquia/acquia_search/apachesolr/SolrPhpClient) [function.opendir]: failed to open dir: Too many open files in /home/vhost/WWW/campus-24.com/includes/file.inc on line 955.
    warning: opendir(profiles/drupal_commons/modules/acquia/acquia_search/apachesolr/drush) [function.opendir]: failed to open dir: Too many open files in /home/vhost/WWW/campus-24.com/includes/file.inc on line 955.
    warning: opendir(profiles/drupal_commons/modules/contrib/date/date/translations) [function.opendir]: failed to open dir: Too many open files in /home/vhost/WWW/campus-24.com/includes/file.inc on line 955.
    warning: opendir(profiles/drupal_commons/modules/contrib/date/date_timezone/translations) [function.opendir]: failed to open dir: Too many open files in /home/vhost/WWW/campus-24.com/includes/file.inc on line 955.
    warning: opendir(profiles/drupal_commons/modules/contrib/date/date_popup/themes) [function.opendir]: failed to open dir: Too many open files in /home/vhost/WWW/campus-24.com/includes/file.inc on line 955.
    warning: opendir(profiles/drupal_commons/modules/contrib/date/date_popup/lib) [function.opendir]: failed to open dir: Too many open files in /home/vhost/WWW/campus-24.com/includes/file.inc on line 955.
    warning: opendir(profiles/drupal_commons/modules/contrib/date/date_popup/translations) [function.opendir]: failed to open dir: Too many open files in /home/vhost/WWW/campus-24.com/includes/file.inc on line 955.
    warning: opendir(profiles/drupal_commons/modules/contrib/date/date_locale/translations) [function.opendir]: failed to open dir: Too many open files in /home/vhost/WWW/campus-24.com/includes/file.inc on line 955.
    warning: opendir(profiles/drupal_commons/modules/contrib/date/date_tools/translations) [function.opendir]: failed to open dir: Too many open files in /home/vhost/WWW/campus-24.com/includes/file.inc on line 955.
    warning: opendir(profiles/drupal_commons/modules/contrib/date/date_php4/translations) [function.opendir]: failed to open dir: Too many open files in /home/vhost/WWW/campus-24.com/includes/file.inc on line 955.
    warning: opendir(profiles/drupal_commons/modules/contrib/date/date_repeat/translations) [function.opendir]: failed to open dir: Too many open files in /home/vhost/WWW/campus-24.com/includes/file.inc on line 955.

plz help me - just advice me what to do!

what do you think - can i apply the patch that was offered by christian - see here: http://drupal.org/files/issues/file_exists-2.patch

Comments

gagarine’s picture

https://interface-network.com - Interface Network is an action and research technology governance agency.

unleash’s picture

hello Gagarine

many many thanks for the quick reply - i did not want to cross post - but i am faced with a big big issue here - and i do absolutly not know what i can do to fix the thing!?

Dear Gagarine - what do you think about the issue?! You mentioned years ago the following sentence:

"Anny way you can remove all .po files with one bash command (google it)."

well i have the same issue here: What do you want to say with the above mentioned sentence!?

love to hear from you

greetings
unleash -
(and i do not want to cross post !!- plz advice!) Sorry for the cross-posting!

unleash’s picture

update:

the issue with the open file-handle arises and occurs also in the Post-Installation time

see here the threads with description:

http://drupal.stackexchange.com/questions/25858/failed-to-open-dir-apach...

http://drupal.org/node/1488016

Note: on my local webserver (that runs Apache 2.2) all goes nice: no problem with installation no problem with all actions i take during the running of the site. All jobs and works are proecessed without any issues.

Well - is it possible that the webserver is tooo weak - it has not too much memory. and it is 6 year old.

My question is - what causes the open filehandles!?
does the openFile-handles that are allowed by Apache are the root of my lack of processing image-upload.
And subsequently: At which rate of allowed Apache FileHandles i can get (reproduce and verify) the behaviour that the webserver show.

Beside the fact that the webserver runs Apache 1.3.8 and my local Apache is a Version 2.2 (on OpenSuse 12.1) i want to do some tests.
I want to lower the rate of allowed Apache FileHandles to see at which rate the system (the image upload) breaks? if we can see that there is a relationship between allowed Apache FileHandles and errors in Image uplaod. What do you think about this idea!? Now i have to have a closer look where i can configure the amount of allowed ApachefileHandles.

contrary to my ideas Dman states here:

As there are many differences between your test setup and the live setup, and this is an OS-level problem, the only debugging that can be done is on the real site. You will not be able to replicate usefully unless you have a full clone of the live site.

see here http://drupal.org/node/1488016

well i guess that he is right - i have to debug the live-site and the real-webserver -that runs Apache 1.3.8