MySQL Forums :: Newbie :: How many users on one connection?


Advanced Search

How many users on one connection?
Posted by: Jamie Perkins ()
Date: September 26, 2013 10:19AM

Hi,

I have a web app that I have set up a special user for, so that for anyone using the app, mysql connections are made with that user. I have coded the connection to be persistent, so that the connection remains open for a set time. So my question is if user A logs on to my app and opens a connection, if a user B or user C logs in do they use the same connection, since it's the same user being used to make the mysql connection?

It is important because the connections will remain open since they are persistent, and I'm wondering, if I have 1000 users on the site, will all 1000 use the same connection? Would it be more efficient if they used different connections?

Last question, the default timeout (wait_timeout) for closing sleeping mysql connections is 8 hours. Is this optimal, since presumably all of my web app users are using the same mysql connection? Just wondering what is the best way to set this up. Thanks much.

Options: ReplyQuote


Subject Written By Posted
How many users on one connection? Jamie Perkins 09/26/2013 10:19AM
Re: How many users on one connection? Peter Brawley 09/26/2013 10:34AM
Re: How many users on one connection? Jamie Perkins 09/26/2013 10:41AM
Re: How many users on one connection? Peter Brawley 09/26/2013 10:44AM
Re: How many users on one connection? Jamie Perkins 09/26/2013 10:48AM
Re: How many users on one connection? Peter Brawley 09/26/2013 10:54AM
Re: How many users on one connection? Jamie Perkins 09/26/2013 11:16AM
Re: How many users on one connection? Peter Brawley 09/26/2013 11:48AM
Re: How many users on one connection? Jamie Perkins 09/26/2013 12:23PM
Re: How many users on one connection? Peter Brawley 09/26/2013 02:07PM
Re: How many users on one connection? Rick James 09/26/2013 11:38PM
Re: How many users on one connection? Jamie Perkins 09/27/2013 09:28AM
Re: How many users on one connection? Peter Brawley 09/27/2013 10:59AM
Re: How many users on one connection? Rick James 09/27/2013 07:26PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.