sttaq Posted April 23, 2014 Share Posted April 23, 2014 Hi I want to find out for how long does PrestaShop keep a database connection open? Also, for how long it tracks visitors online presence? For example currently stats show hundreds of visitors online but in reality there are none and a lot of them visited hours ago. Quite a few of them are bots. Just trying to figure out how PrestaShop is coming up with such figures and why it keeps on showing visitors online for a very long time? Also, Is there a relation between online user and number of concurrent connections to database? If Google bot visits my website, how many database connections will be created? Link to comment Share on other sites More sharing options...
vekia Posted April 23, 2014 Share Posted April 23, 2014 turn on error reporting with db profiling then you will see detailed log related to database after each page refresh 1 Link to comment Share on other sites More sharing options...
sttaq Posted April 23, 2014 Author Share Posted April 23, 2014 On 4/23/2014 at 11:24 PM, vekia said: turn on error reporting with db profiling then you will see detailed log related to database after each page refresh Thanks, I enabled debug and got a "You'd better run your shop on a toaster" message. What can or should I do with that? What are the key things to look for? How do I know if database connection is still open? Link to comment Share on other sites More sharing options...
bellini13 Posted April 24, 2014 Share Posted April 24, 2014 database connections will remain open unless they are explicitly closed, or they time out based on your mysql configuration. The mysql configuration setting is called connect-timeout 1 Link to comment Share on other sites More sharing options...
sttaq Posted April 24, 2014 Author Share Posted April 24, 2014 On 4/24/2014 at 8:33 PM, bellini13 said: database connections will remain open unless they are explicitly closed, or they time out based on your mysql configuration. The mysql configuration setting is called connect-timeout So you mean by default they remain open, even when Google visits the website? Is it a good idea to reduce the connect-timeout? My hosting provider has informed me that on shared hosting they allow a maximum of 15 concurrent connections on mysql. So, if the connection is left open then is there any effect on the number of users using the website at the same time or the connection is opened only once for several sessions? Link to comment Share on other sites More sharing options...
bellini13 Posted April 25, 2014 Share Posted April 25, 2014 I didn't say the connection is left open. I said the connection will remain open if not properly closed. And if it is not properly closed, then it will remain open for as long as the connection time out setting says to leave it open for. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now