I've found plenty of examples of this error in the forum...but i don't understand many of the "fixes". I recently migrated my site from a internal server to go daddy. The error comes when I try to back up my db with Backup and Migrate. I do not know my way around phpmyadmin...but I can follow instruction! Any help would be appreciated!

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 2006 MySQL server has gone away' in /home/captjamesmiller/public_html/includes/database/database.inc:2171 Stack trace: #0 /home/captjamesmiller/public_html/includes/database/database.inc(2171): PDOStatement->execute(Array) #1 /home/captjamesmiller/public_html/includes/database/database.inc(683): DatabaseStatementBase->execute(Array, Array) #2 /home/captjamesmiller/public_html/includes/database/database.inc(2350): DatabaseConnection->query('SELECT expire, ...', Array, Array) #3 /home/captjamesmiller/public_html/includes/lock.inc(167): db_query('SELECT expire, ...', Array) #4 /home/captjamesmiller/public_html/includes/lock.inc(146): lock_may_be_available('schema:runtime:...') #5 /home/captjamesmiller/public_html/includes/bootstrap.inc(433): lock_acquire('schema:runtime:...') #6 /home/captjamesmiller/public_html/includes/bootstrap.inc(455): DrupalCacheArray->set(Array) #7 [internal function]: DrupalCacheArray->__destruct() #8 {main} in /home/captjamesmiller/public_html/includes/database/data

Comments

Captjmiller’s picture

anyone.....

Poieo’s picture

Have you talked to GoDaddy about the resources available to your site? It looks like the server is getting overloaded and rejecting the SQL connection.

Captjmiller’s picture

They had me create a file named .user.ini in the public_html folder. I set the contents to this:

memory_limit = 128M
max_execution_time = 120
max_input_time = 120

could settings.php influence the process?

Thanks for the help!

Poieo’s picture

Do you have a large site? Meaning 10000+ nodes?

I still think it is a resource issue with GoDaddy. They are notorious for not really knowing what is going on.

Try setting memory_limit = 256M. If that doesn't work, try 512M. But, you need to verify the site is actually using it. What does the status report say the memory limit is?

admin/reports/status

Captjmiller’s picture

I have alot of attachments, but that shouldn't affect the db backup. I raised the mem to 256 and yes the report confirms. Still no-go. Could it be a time out issue? Don't think my db is large... 9mb last time I checked.

Thanks

Poieo’s picture

You shouldn't have any more resource issues with that much memory and that small of a database.

I would disable all modules except core and backup/migrate and see if you can get it to run. It's possible another module is causing an issue.

If you can't backup with just core enabled, then something is wrong on the server side and it's not available resources.

You might also try disabling and uninstalling backup/migrate then re-enabling it, just to be safe. Also make sure you're running the latest version.

Captjmiller’s picture

I'll try that...I appreciate your help!

Captjmiller’s picture

Getting this message now

The website encountered an unexpected error. Please try again later.

Progress maybe. Godaddy has not helped much

Poieo’s picture

That's typically a resource issue as well.

Do you have the ability to do a new installation of Drupal through your hosting account? If you could try and backup a clean installation that would help ensure the issue is server side.

Captjmiller’s picture

go daddy not much help so far. I'll bring the site back to my desktop server and see if it works there.

Thanks for your time Poieo

Poieo’s picture

Your biggest problem is GoDaddy. They are dirt cheap for a reason.

I would look into some other Drupal specific hosting like:

https://omega8.cc
https://www.getpantheon.com
https://www.acquia.com/products-services/acquia-cloud

Captjmiller’s picture

thanks for your help. Went back and deleted a bunch of unused modules, flushed the cache.....working fine. Not sure if it was a module conflict or memory issue. but it works...THANKS!!!

Jaypan’s picture

Memory issue. GoDaddy only gives you limited resources (as someone said, they are cheap for a reason).

Increasing your memory limits also likely had no impact, they will have a cap on the memory available, and if you specify a higher value, it will be ignored.

sunsoftechnology’s picture

Disabling update manager worked for me.