• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

22. Databases > How Many Connections Can Your Database Handle?

How Many Connections Can Your Database Handle?

If you generate dynamic content from a database, you may be limited by the number of connections your database can handle. This is a configurable parameter for most databases, but if you configure it very high, you will probably see that you run out of memory or some other resource before you reach the configured connection limit.

Here is a quick Java program that will create an arbitrary number of connections to your database and print them out as it creates them. It is intended to stress and perhaps crash a database, so be careful not to use it on any system that should not crash. It uses the Oracle “thin” driver, but you can modify it to use any driver. Compile with java jdbcCxnTest. The following source code is available from http://patrick.net/software/jdbcCxnTest.java:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint