Jump to content

Limit single function's execution time


F1Fan

Recommended Posts

I have a site that connects to several databases. One is a critical connection, but the others are just for some non-essential reports. The problem is that when those secondary DBs are having issues, the entire site slows to a crawl.

 

So, what I'd like to do is attempt to connect to all the DBs, but put a time limit on those that aren't essential. If the connect function for any of those DBs takes too long, kill that function and move on.

 

Any ideas?

Link to comment
Share on other sites

Hmm, that's a good start. The problem is that the DBs are PostgreSQL (critical), Oracle, AS400 (DB2), and MS SQL (which is the reason this isn't posted in a specific SQL board). PostgreSQL and Oracle use pgsql and oci8 MDB2 drivers, and the AS400 and MS SQL use odbc.

 

I'm looking to see if there's an equivalent for each of those connections, but if you know and could tell me before I can search for it, that'd be cool!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.