Jump to content

ps_connections and Bad SQL Query


Recommended Posts

Hi,

 

We've been having a series of problems with one of our shops - using Prestashop v.1.3.1.1

 

The site has been running smoothly for over 18 months without incident.

 

Recently we've been getting the message 'failed to connect to database' and the site being inaccessible for 30 minutes at a time. The site will run without problem for hours before and after these outages.

 

Our hosting company Heart Internet advised that the problem is being caused by CPU overload due to MSQL enquiries / errors and timeouts

 

I've looked at our database and it was standing at 708 meg in size. On closer inspection it revealed that the following tables were taking up most of this space.

 

ps_connections

ps_connections_page

ps_connections_source

 

On reading the forums, and from suggestions by other Prestashop users we truncated and deleted the content of these tables. I believe they relate to old customer carts and visitor info.

 

Straight away the site is running much faster

 

The database has also reduced from 708 meg down to a trim 108 meg!

 

It's too early to see if this has fixed the 'failed to connect to database' error

 

I've just looked at the customers tab in the back office of Prestashop and we're now getting a Bad SQL query.

 

Orders are coming through fine, and everything else is working okay.

 

Will clearing down the ps_connections tables - have caused this error message?

 

We're using a pretty old version of Prestashop (v1.3.1.1) has the ps_connections problem been fixed in later versions of Prestashop?

 

Is it just good practice to reduce these tables (ps_connections) from time to time?

 

Prestashop has been a great platform for us, but these last few months have made me question its reliability.

 

Any help or advice would be greatly appreciated

 

Thanks in advance

 

Brian

Link to comment
Share on other sites

ps_connections

...

On reading the forums, and from suggestions by other Prestashop users we truncated and deleted the content of these tables.

...

I've just looked at the customers tab in the back office of Prestashop and we're now getting a Bad SQL query.

...

Will clearing down the ps_connections tables - have caused this error message?

Since I suggested to truncate the said table you might still want to confirm this reply by an independent source :rolleyes:

 

The answer to your question, FWIW, is no, truncating ps_connections table will not cause the error you are seeing. Unless you truncated/deleted a different table without realizing, the problem is not related. You can also restore the table to confirm this. You did make a backup as I asked, yes?

Link to comment
Share on other sites

  • 2 months later...

I want to say a big thanks to shacker above.

 

Every time I clicked on the customers tab in back office I had a Bad SQL Query.

 

Using his delete connections module has sorted this problem out, which I've had for over a year!! :D

Link to comment
Share on other sites

  • 1 year later...

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...