Can you elaborate more on when you say
your provider should configure their web server so that with as many executing as the web server is prepared to run at once, you still won't exceed the database connections.
I have a reputed provider. Its just that I am getting fancy with my code.
None of my pages open more than a couple of connections at a time. Suppose the provider provides 50 max. simultanoeus connection.
I know that for any decent site, that limit will never be reached.
For my own practise, all my pages request connection via a pooled class, that returns a reference to an exception, only if the currently open number of connections for all pages together is less than 45.
In java, this is very easy to implement via Servlets & synchronized construct.
I am just trying to add synchronization to the pooled class' requestConnection method, to prevent races conditions in manipulating the static connCount variable.