Jump to content

VPS Shutting down same time every day - excessive RAM


Recommended Posts

I hope someone here can give me some guidence on this.

 

I moved my site to a VPS server after problems on a shared server a month ago, and now the shared server is shutting down at 4 am every morning, requiring a reboot which then takes up to 20 minutes to restart it, and usually more than one attempt.

 

Hosting.co.uk is useless and telling me nothing, After asking several times they told me yesterday that RAM is being exhausted, but they seem unable or unwilling to tell me anything else.

 

There's clearly something happening every morning which is devouring resources and shutting down my server, but they are entirely disinterested in resolving this.

 

Can anyone here tell me whether it's something within Prestashop causing this?

 

Obviously, with my site down for several hours almost every day this is now completely unsustainable.

 

Thanks for any help you can give.

Link to comment
Share on other sites

Well hosting should help you more really but often you need to have bit of luck to 

get right person from support.

 

I do not know much about servers but what you can check maybe are error logs in you cPanel.

 

And if it is a PrestaShop error you can check if there is error_log file in your root and also in your

admin folder. And because it is in same time, do you maybe have some cronjob set ?

Maybe block layered indexing or some module that syncs products/stock ? This is just guessing. 

Link to comment
Share on other sites

Thanks for the help,

 

Looking at the Error Log I see a lot of these:

 

[24-Oct-2015 04:39:57 UTC] PHP Warning:  PDO::query(): Error reading result set's header in /home/**************/public_html/classes/db/DbPDO.php on line 132
[24-Oct-2015 04:39:57 UTC] PHP Warning:  PDO::query(): Error reading result set's header in /home/**************/public_html/classes/db/DbPDO.php on line 132
[24-Oct-2015 04:30:08 UTC] PHP Warning:  PDO::query(): MySQL server has gone away in /home/**************/public_html/classes/db/DbPDO.php on line 132
[24-Oct-2015 04:40:04 UTC] PHP Warning:  PDO::query(): Error reading result set's header in /home/**************/public_html/classes/db/DbPDO.php on line 132
[24-Oct-2015 04:41:05 UTC] PHP Warning:  Error while sending QUERY packet. PID=4941 in /home/**************/public_html/classes/db/DbPDO.php on line 132
[24-Oct-2015 04:42:12 GMT+0] PHP Warning:  Error while sending QUERY packet. PID=4751 in /home/**************/public_html/classes/db/DbPDO.php on line 132

 

Which is apparently pertaining to this:

 

    /**
     * Executes an SQL statement, returning a result set as a PDOStatement object or true/false.
     *
     * @see DbCore::_query()
     * @param string $sql
     * @return PDOStatement
     */
    protected function _query($sql)
    {
        return $this->link->query($sql);
    }

 

So it seems to me that something is set to check the database at this time each day, but that there is a problem in the settings it's encountering and it's repeating the step again and again until the VPS gives up due to resources.

 

Unfortunately I have no idea how to track down what is being called or what I need to change. It might be something as simple as changing from true to false.

 

Thanks for your help so far, at least now I know that it's something that can probably be fixed.

I'm trying to work out what could have been changed in the last couple of weeks to cause this.

Link to comment
Share on other sites

I've just deactivated every stats related module, and already the whole shop is moving a lot faster.

Hopefully, even if I can't work out what DB call is causing the error from the info above I can see if it happens over the next couple of days and then if it doesn't I know it's a module.

 

It's the only thing I can think it would be, I haven't added any cron jobs at all, so it would have to be an automated call (which the error suggests).

I just wish there was more info about what it was actually trying to achieve.

 

Thanks again for your help

Link to comment
Share on other sites

I suggests looking at any cron jobs that might be running on your shop.  

 

back up?

other?

 

check to see if you have cron module and if any cron jobs set up from your hosting.

I haven't scheduled any backup, I do this manually once a week.

However, looking at the backup option in cPanel there is one created this morning.

 

I'm assuming this is something they have created, but I can't see that being the culprit if the error log is showing a Prestashop function as causing the DB to go down at that time in the morning.

 

Surely if it was the backup causing this there would not be an error in the PS error log relating to the queery it is trying to run?

 

Unless the backup is shutting down the DB before the queery and that's what's causing the error to show in the list?

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