Jump to content

Active DB connections


sttaq

Recommended Posts

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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...