Friday, March 30, 2007

The final nail for shared servers

I've been running shared servers and dedicated servers in a mixed mode for a number of years. In theory, there are a lot of advantages to shared servers; connection pooling, connection multiplexing, and pre-established connections.

I like to setup one database alias for dedicated connections (middle-tiers, batch jobs, etc.) and one for shared connections (CGI scripts, mod_plsql, and Client/Server sessions that have a lot of "think" time). Each alias then points to a specific listener that is either setup as a local listener or is a dispatcher. Granted, tracing is never easy on a session that is connected to a shared server. But, in general, it worked pretty good.

About a year ago I had a problem where my multiplexed connections periodically got disconnected. We tracked it down to an issue with multiplexing (implemented in shared servers) on 9.2 and Linux. For this particular application, shared servers weren't critical, so we just rerouted the alias to a dedicated listener.

Over the past 6 months or so, we've been experiencing in-memory block corruption in 9.2 dbs on 64-bit Linux. It was on multiple hosts, multiple dbs, and different patch levels of Oracle. Since the problem wasn't consistent and disguised itself as multiple ORA-00600/07445 errors we, nor Oracle Support, could ever track the root cause. Time would go by without error, the TAR would get closed, and we would experience a different ORA-00600 error.

After much prodding, we finally got an analyst at Oracle that understood what we were up against and looked at ALL our TARs, not just the current problem. They pieced together everything and pointed to bug 5324905; memory corruption from shared servers.

While they are great in theory, the disadvantages of shared servers outweigh the advantages at this point.

10 comments:

Tim... said...

I've never been convinced about shared server, or MTS as it was known. It seems every release claims to fix the bugs in it, but you still get lots of people griping about it.

I guess these days most of the connection pooling in enterprise development can be controlled by the middle tier, making shared server a less obvious choice anyway.

Did I just advocate offloading functionality to the middle tier? I feel quite queezy now. :)

Cheers

Tim...

Anonymous said...

I've been running shared servers/MTS for about 5 years now, on Oracle8i and now Oracle9i, on Solaris. We ran it because the vendor providing our primary application specified it that way. I'm going to be changing to a Linux server in the next few months, should I be concerned? Have I just been lucky?

Jeff Hunter said...

I can tell you that the majority of problems I've had with MTS has been on Linux. I've been running 8i and 9i on Solaris for years without any issues. Test, test, test, and consider using dedicated servers.

Jeff Hunter said...

I guess these days most of the connection pooling in enterprise development can be controlled by the middle tier, making shared server a less obvious choice anyway.
agreed. But we still have a substantial base of cgi/mod_plsql scripts that connect to the database, do something, and disconnect. Maybe this will be the driver to move to Apex or something else...

Anonymous said...

I have seen various issues with shared server going back to late 90's on hpux and solaris. No way these problems are confined to linux.

No way I would ever run them in my production environments. People that advocate the usage of shared server just don't have adequate experience or know how much "balance out" the recommended best practices from oracle.

Jeff Hunter said...

People that advocate the usage of shared server just don't have adequate experience or know how much "balance out" the recommended best practices from oracle.
Oh, I don't know about that. I've been using MTS on Solaris since 7.2 and have only run into problems on Linux. Maybe my applications have changed in 15 years, maybe the MTS code has gotten a little loose in that time, but I've had good luck in the past.

Anonymous said...

If you have access to the book "Oracle Insights Tales of Oak table", Dave Ensor has some 'nice' things to say about MTS in his chapter on Oracle history.

Joel Garry said...

My only experience with MTS is throwing it out for performance reasons. I still feel vaguely ripped off for taking the course in the '90s. Even though it is one of the few courses I got someone else to pay for.

Yasin Baskan said...

I have been using MTS on 9.2 on Solaris but I cannot say I am pleased with it. It caused lots of problems for us, ORA-600s, ORA-7445s, issues with distributed transactions. We finally gave up using it.

Anonymous said...

Very interesting!