"Too many open files" errors

barossa

Joined: 2006-04-24
Posts: 4
Posted: Mon, 2006-04-24 04:11

Whenever I try to any of several operations (as admin or user) such as delete an image, I get a "Too many files open" error. Example is below. I have tried a fresh install several times (both full and typical). Installation completes normally.

Any ideas? Without shell access, it is possible to determine how many files are open and what the limit is?

Thanks!

Warning: fopen(/home/content/m/a/r/marklinderman/html/picts/gallery2/g2data/locks/3/4/340): failed to open stream: Too many open files in /home/content/m/a/r/marklinderman/html/picts/gallery2/modules/core/classes/GalleryPlatform.class on line 369

Error Detail -
Error (ERROR_PLATFORM_FAILURE) : /home/content/m/a/r/marklinderman/html/picts/gallery2/g2data/locks/0/7/7

* in modules/core/classes/FlockLockSystem.class at line 77 (gallerycoreapi::error)
* in modules/core/classes/GalleryLockSystem.class at line 101 (flocklocksystem::_acquirelock)
* in modules/core/classes/helpers/GalleryLockHelper_simple.class at line 148 (flocklocksystem::acquirereadlock)
* in modules/core/classes/GalleryCoreApi.class at line 2280 (gallerylockhelper_simple::acquirereadlockparents)
* in modules/core/classes/helpers/GalleryEntityHelper_medium.class at line 65 (gallerycoreapi::acquirereadlockparents)
* in modules/core/classes/GalleryCoreApi.class at line 2395 (galleryentityhelper_medium::deleteentitybyid)
* in modules/core/ItemDelete.inc at line 86 (gallerycoreapi::deleteentitybyid)
* in main.php at line 199 (itemdeletecontroller::handlerequest)
* in main.php at line 87
* in main.php at line 80

______
Hosting service: godaddy (deluxe CGI/Linux)
Gallery version 2.1.1
PHP version 4.3.11 cgi-fcgi
Webserver Apache
Database mysql 4.0.24-max-log
Toolkits ImageMagick
Operating system Linux linhostjava01.mesa1.secureserver.net 2.4.21-27.ELsmp #1 SMP Wed Dec 1 21:59:02 EST 2004 i686
Browser Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.2) Gecko/20060308 Firefox/1.5.0.2

AttachmentSize
testinfo.php.htm.txt31.56 KB
 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2006-04-24 07:48

what's the server setting for the max nr of open file handles?

ulimit -a

 
barossa

Joined: 2006-04-24
Posts: 4
Posted: Mon, 2006-04-24 23:56

The only thing that is limited is:
virtual memory (kbytes, -v) 1573888

I called tech support, and they insisted that there isn't a limit on open files. Of course, that isn't true if there is a limit set in the kernel, but that is the answer I got. Whether he understood the difference between a "file" and an "open file" is unclear.

<?php echo exec('ulimit -n'); ?> returns 32.

 
joe7rocks
joe7rocks's picture

Joined: 2004-10-07
Posts: 560
Posted: Wed, 2006-05-03 11:17
 
barossa

Joined: 2006-04-24
Posts: 4
Posted: Fri, 2006-05-05 23:53

It happens even when I try to delete a single image. Just to thorough, I asked if they could up the limit. Not surprisingly, the answer was no.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2006-05-06 07:12

switch to database based locking in
site admin -> general (at the bottom of the page).

 
barossa

Joined: 2006-04-24
Posts: 4
Posted: Wed, 2006-05-17 03:00

that did the trick. Thanks.