Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Database connedtion in session

Options
  • 10-01-2011 10:34am
    #1
    Registered Users Posts: 66 ✭✭


    When I started web development many years ago I would connect and release database connection on each page as required. Once a page had loaded the db connection would be closed until the user triggered the opening of it again by doing a search or something. This way there would be very few connections open at any time.

    However it now seems standard to connect to the DB once the user lands on the home page on a website and store that connection in the session. Wordpress is an example of this.

    With storing the connection in the session if you have 100 people on your site then there is 100 open db connection. The majority of them may not be doing anything as once a page is load but they are still open until a user navigates away from the site.

    If you have a basic hosting package with lunarpages, letshost or any other anyone -your standard €100 package.. is there a limit on your open connections?


Advertisement