MySQL Forums
Forum List  »  Newbie

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?
September 26, 2013 10:19AM


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.