0

This question already has an answer here:

I have a Drupal site I need to show for portfolio reasons so I have installed it in a sub directory.

  • I have changed the rewritebase to /subdir

Initially without that change I was served the homepage just fine but no interior pages. With that change I was able to get deeper into this site but when I went to login the backend it loaded forever and spit out this error:

Additional uncaught exception thrown while handling exception.

Original

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT source FROM {url_alias} WHERE alias = :alias AND language IN (:language, :language_none) ORDER BY language ASC, pid DESC; Array ( [:alias] => user [:language] => en [:language_none] => und ) in drupal_lookup_path() (line 176 of /home/content/k/c/l/name/html/fsubdir/includes/path.inc).

Additional

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: INSERT INTO {watchdog} (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9); Array ( [:db_insert_placeholder_0] => 0 [:db_insert_placeholder_1] => php [:db_insert_placeholder_2] => %type: !message in %function (line %line of %file). [:db_insert_placeholder_3] => a:6:{s:5:"%type";s:12:"PDOException";s:8:"!message";s:284:"SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT source FROM {url_alias} WHERE alias = :alias AND language IN (:language, :language_none) ORDER BY language ASC, pid DESC; Array ( [:alias] => user [:language] => en [:language_none] => und ) ";s:9:"%function";s:20:"drupal_lookup_path()";s:5:"%file";s:61:"/home/content/k/c/l/name/html/subdir/includes/path.inc";s:5:"%line";i:176;s:14:"severity_level";i:3;} [:db_insert_placeholder_4] => 3 [:db_insert_placeholder_5] => [:db_insert_placeholder_6] => http://mydomain.com/subdir/?q=user [:db_insert_placeholder_7] => [:db_insert_placeholder_8] => 173.10.171.18 [:db_insert_placeholder_9] => 1354293470 ) in dblog_watchdog() (line 157 of /home/content/k/c/l/name/html/subdir/modules/dblog/dblog.module).

Can anyone point me in the right direction to get this resolved?

marked as duplicate by kenorb, Shawn Conn, Adrian Cid Almaguer, Krishna Mohan, Neograph734 Jun 8 '16 at 9:14

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • I have Drupal installed in a sub-directory, on my test site, and I don't get any error. That is not the cause of the error. – kiamlaluno Nov 30 '12 at 17:00
  • Any idea what would give me this error? – KenAesthetic Nov 30 '12 at 17:06
0

The server gone away error is an error that happens when the client cannot connect to the database server, and it can happen because:

  • The client doesn't have the necessary privileges to access the database
  • There has been a timeout on the TCP/IP connection
  • The client is running on Windows, and the server dropped the connection, probably because a timeout

When I got that error on my sites was always because the credentials I used in the settings.php file were wrong.
The other reason to get that error is that the value of max_allowed_packet is too small.

  • It is strange because sometimes the page finally loads and other times I get this error... I think it is a timeout issue. Could it be because the site is on a shared server instead of a dedicated server? – KenAesthetic Dec 3 '12 at 17:46

Not the answer you're looking for? Browse other questions tagged or ask your own question.