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.

--
Dossy Shiobara              | [email protected] | http://dossy.org/
Panoptic Computer Network   | http://panoptic.com/
  "He realized the fastest way to change is to laugh at your own
    folly -- then you can let go and quickly move on." (p. 70)


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

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

Reply via email to