PsychoSpunk has asked for the wisdom of the Perl Monks concerning the following question:

Well, today's been one of those days where I'm hunting down information that seems nearly impossible to find. I'm in a small bind because I can't get a decent log file from the request broker on the database server. I continually get a log that looks like: XX:XX:XX dbuser@webserver could not connect (exceeded maximum number of allowed connections). That's all that the log file has. I was going to use DBI->trace(3) in order to log the errors and good connections from the web server end, but it doesn't do me much good if the logs on the database server can't match up.

Which brings me to my question: Is anyone aware of a utility that will let me watch real time connections to a database and plot them to graphs, logs, whatever? I'd need/want to be able to use this primarily on an NT environment, since I can use DBI's own logging on the *nix.

I am beginning to realize that this is actually looking very similar to netstat, but I would need not only the connection strings logged, but any transactions that occur over the established connection. I think this is where my exceeded limit comes from.

I will be grateful.

ALL HAIL BRAK!!!

Replies are listed 'Best First'.
Re: DBD::ODBC and possibly OT.
by Fastolfe (Vicar) on Nov 09, 2000 at 04:06 UTC
    I imagine it's the remote DB server that's giving you the message. Either it has a low limit (set by your user license?), or you have a lot of scripts that are tying up connections. I know this doesn't quite answer your question, but in the absense of log information, look to the information you do have.

    Additionally, I'd consult with your database vendor (Oracle? MS SQL server?) about client packages they offer that might have the monitoring features you're interested in. You don't tell us what type of environment you're running under so it's impossible to even guess at a Perl recommendation. You may be able to do this by parsing DBI trace data for all of your scripts, but this is going to be pretty complex and difficult to do in real-time.

      Thanks, Fastolfe. The reason why I failed to mention the systems that the web servers are running on is that I don't think it matters. I've got Perl running on it, so apparently I can do something Perlish.

      I'll look into seeing if their is a MS SQL supplied real-time logger. I was hoping to find something less proprietary than that, though. ++ for being first and jolting my mind. :)

      ALL HAIL BRAK!!!