0

I have a fresh install of Drupal Commons (version 6.25), and I am not allowed to upload an image. See the full description of this so called image upload issue here on this site.

new Update one a sitenote...

i want to mention that i - for the purpose of some tests have put two sites onto the server

http://schulcenter.net (for sure Version Drupal-Commons 6.25) http://schulcenter.org - (probably Version Drupal-Commons 6.23)

and they run on the same database ;-)

guess that that can cause the open File handles what do you think !? Love to hear from you

well i guess that i have to switch off one site. ;-) greetings (end of update)

here the original-initial-thread starts:

I have changed some settings regarding the file handling; I set the permissions for sites/default/files, I created a temporary directory and edited the paths accordingly. All of these seem to work, and workarounds did not change the bad habit of the site: The image upload is impossible.

Can we verify the impact of a decreased amount of Apache File handlers on the possibilities and capabilities of file, and image-handles, especially of the option to upload images? Is there any impact?

dman, a very experienced web and Drupal developer, had a closer look at the site and noticed the site status under the 'Reports' tab lists many errors, including the following one:

opendir(*) [function.opendir]: failed to open dir: Too many open files in /home/vhost/WWW/schulcenter.net/includes/file.inc on line 963.

It seems like it could make anything on the site break, especially things that work with files, but also anything that reads files.
I have more than 1200 repots of such message about opendir("profiles/drupal_commons/modules/acquia/acquia_search/apachesolr/drush").

I do not have installed any drush. Besides this thing, I have no clue why we get such a big amount of open file handles the server is faced with.

The dblog module monitors your website, capturing system events in a log to be reviewed by an authorized individual at a later time. The dblog log is simply a list of recorded events containing usage data, performance data, errors, warnings and operational information. It is vital to check the dblog report on a regular basis as it is often the only way to tell what is going on.

Details Type php Date Sunday, 18 March, 2012 - 21:48 User martin Location http://schulcenter.net/?q=admin/reports/dblog Referrer
Message opendir(profiles/drupal_commons/modules/acquia/acquia_search/apachesolr/drush) [function.opendir]: failed to open dir: Too many open files in /home/vhost/WWW/schulcenter.net/includes/file.inc on line 963. Severity error Hostname 188.99.184.201 Operations

1

Did you find this comment on drupal.org?

The problem is a maximum open files limit per users.
We had several web servers, and several new Apache2 VirtualHost; Apache2 (www-data) reached the maximum number of open files (1024).

You can check that with ulimit -a or ulimit -n. (The default is maximum 1024 open files.)

You can modify it with ulimit -n 1500, but it will be lost after reboot.

To make the change permanent, add in /etc/security/limits.conf:

#<domain> <type> <item> <value>
#
www-data soft nofile 1600
www-data hard nofile 65535

Of course, restart your web server.

It explains how to set a per-user limit and increase the number of files that can be opened. If you don't have enough memory in the server, there may not be many options.

  • hello thx for he answer!! i will read the comment you point to. i havent done it yet, -- i come back and report all my findings - greetings update ahh yes know the story of didier - i stumbled upon it months ago. but now i know that this issue do not have toi do only with the installation [ note i got aware of this issue while installing on the weak server... nowadays i prepare on the local machine and afterwards i port over. i thought that this might be a kind of a workaround... but as we see- i do not get rid of the bad circumstances the server has to face,,,,, . i try to do my best!! – zero Mar 19 '12 at 0:09
  • hope your issue was resolved, it can be frustrating when the server acts up like that. – Arosboro Mar 19 '12 at 0:17
  • hello dear arosboro thx alot. Not yet resolved but workin on it.. I've not worked with this problem before and now i contact my sys-admin. Option A **- increase the limit to make things work again. Easy **Option B - find why that limit is being hit at all - it's not normal. It may be a side-effect from other things running on that server also, any process there shares the pool of file handles. – zero Mar 19 '12 at 6:20
  • one a sitenote... i want to mention that i - for the purpose of some tests have put two sites onto the server schulcenter.net ( for sure Version Drupal-Commons 6.25) schulcenter.org - (probably Version Drupal-Commons 6.23 ) and they run on the same database ;-) guess that that can cause the open File handles what do you think !? Love to hear from you we ll i guess that i have to switch off one site... besides these considerations - i guess that you are right - and a move to a new server would fix all the issues and make the troubles go a way greetings – zero Mar 19 '12 at 13:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.