ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> modperl
modperl
Re: Modperl + DBI + Postgresql = Crash (file table full)
by Andrew Ho other posts by this author
Dec 31 2000 2:38AM messages near this date
Modperl + DBI + Postgresql = Crash (file table full) | Re: Modperl + DBI + Postgresql = Crash (file table full)
Hello,


FS> I am currently building an intranet site which uses a Postgresql database 
FS> backend. Unfortunately the database server is opening more files for every 
FS> SQL request from the web site. This quickly leads to a crash after the 
FS> kernels file table has filled up.

I've run mod_perl with a PostgreSQL database before under moderate traffic
and did not encounter the problem you describe. The file descriptor limit
mentioned earlier is a general issue with running Apache, and should not
be related to mod_perl or PostgreSQL per se. Adding "ulimit -n x" to the
apachectl script (where x is some large number, I use 4096) makes this
easy and unforgettable.

Does the file descriptor problem occur when you run as a regular CGI?


FS> As of today I have no idea about the cause of the problem. Initially I 
FS> blamed Apache::DBI and therefore I disabled it, adding $dbh->disconnect 
FS> statements to my code. However this has not solved the problem.

You should add $dbh-> disconnect statements regardless; Apache::DBI will
render those statements harmless, and leaving them in is good practice,
and leaves your script usable out of an Apache::DBI environment.


FS> Apache 1.3
FS> ModPerl
FS> Apache::DBI (disabling this doesn't change anything)

What versions of this stuff, and of PostgreSQL are you using? I assume by
"Apache 1.3" you really mean 1.3.x, where x is something recent...


Humbly,

Andrew

----------------------------------------------------------------------
Andrew Ho               http://www.tellme.com/       andrew@[...].com
Engineer                   info@[...].com          Voice 650-930-9062
Tellme Networks, Inc.       1-800-555-TELL            Fax 650-930-9101
----------------------------------------------------------------------
Thread:
Frank Sonnemans
Andrew Ho
James

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved