Hi Dossy,

Thanks for the response on this. Each page uses one database connection at most and the majority of our pages use none. Database handles are always returned, and I don't see anything in the logs that would lead me to believe that they're aren't being released.

We use similar code to what you listed here for grabbing DB connections and log any connection errors. We're not seeing any DB connection errors in the logs during these higher load times. If the problem is related to the DB, I don't think it's because AOLserver is having trouble getting DB connections.

I think it's worth noting that when AOLserver stops accepting connections, nslog doesn't log any of the failed requests. New connections seem to just be rejected outright.

I'm wondering if there's something in the OS itself that's limiting connections. As near as I can tell, there's nothing in AOLserver's settings that should be stopping additional connections. I'll dig around a bit in CentOS to see if I can't find the culprit there.

Thanks!

-William





On 05/01/2009 10:55 AM, Dossy Shiobara wrote:
On 5/1/09 12:55 PM, William Scott Jordan wrote:
The problem we're seeing is that the web servers are maxing out at about
200-250 simultaneous connections, and all additional connections are
being rejected.

Just a wild guess - does each request use two database handles?

Are you ensuring that database handles are ALWAYS being returned (i.e.,
[ns_db releasehandle $h])? Does your server log show any uncaught Tcl
errors that might preempt the code that would normally perform the
releasehandle?

I often use this pattern in my code:

if {[catch {
set db [ns_db gethandle poolname]

# database ops here

ns_db releasehandle $db
} err]} {
if {[info exists db]} {
ns_db releasehandle $db
unset db
}
}

Of course, you probably want to refactor this into a proc, but you get
the idea.



--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to 
<lists...@listserv.aol.com> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to