Drupal gives error while add content or edit node Hi all i am facing this error when try to edit node or add content 

Additional uncaught exception thrown while handling exception.

Original

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] =&amp;gt; 1 [:db_insert_placeholder_1] =&amp;gt; node [:db_insert_placeholder_2] =&amp;gt; %type: !message in %function (line %line of %file). [:db_insert_placeholder_3] =&amp;gt; a:6:{s:5:&amp;quot;%type&amp;quot;;s:12:&amp;quot;PDOException&amp;quot;;s:8:&amp;quot;!message&amp;quot;;s:238:&amp;quot;SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT 1 AS expression FROM {variable} variable WHERE ( (name = :db_condition_placeholder_0) ); Array ( [:db_condition_placeholder_0] =&amp;amp;gt; drupal_http_request_fails ) &amp;quot;;s:9:&amp;quot;%function&amp;quot;;s:14:&amp;quot;variable_set()&amp;quot;;s:5:&amp;quot;%file&amp;quot;;s:74:&amp;quot;/home/apetrdo6/public_html/Development/InfinityPups/includes/bootstrap.inc&amp;quot;;s:5:&amp;quot;%line&amp;quot;;i:991;s:14:&amp;quot;severity_level&amp;quot;;i:3;} [:db_insert_placeholder_4] =&amp;gt; 3 [:db_insert_placeholder_5] =&amp;gt; [:db_insert_placeholder_6] =&amp;gt; http://apetrailportfolio.com/Development/InfinityPups/node/add/dogs [:db_insert_placeholder_7] =&amp;gt; http://apetrailportfolio.com/Development/InfinityPups/node/add/dogs [:db_insert_placeholder_8] =&amp;gt; 103.63.25.150 [:db_insert_placeholder_9] =&amp;gt; 1473159652 ) in dblog_watchdog() (line 160 of /home/apetrdo6/public_html/Development/InfinityPups/modules/dblog/dblog.module).

Additional

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT 1 AS expression FROM {variable} variable WHERE ( (name = :db_condition_placeholder_0) ); Array ( [:db_condition_placeholder_0] =&amp;gt; drupal_css_cache_files ) in variable_set() (line 991 of /home/apetrdo6/public_html/Development/InfinityPups/includes/bootstrap.inc).

Uncaught exception thrown in session handler.

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: UPDATE {users} SET access=:db_update_placeholder_0 WHERE (uid = :db_condition_placeholder_0) ; Array ( [:db_update_placeholder_0] =&amp;gt; 1473159609 [:db_condition_placeholder_0] =&amp;gt; 1 ) in _drupal_session_write() (line 219 of /home/apetrdo6/public_html/Development/InfinityPups/includes/session.inc).

Uncaught exception thrown in shutdown function.

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: DELETE FROM {semaphore} WHERE (value = :db_condition_placeholder_0) ; Array ( [:db_condition_placeholder_0] =&amp;gt; 80080962057cea1b962fce6.76953018 ) in lock_release_all() (line 269 of /home/apetrdo6/public_html/Development/InfinityPups/includes/lock.inc).
One possibility to solve is to increase "max_allowed_packet" .


    Go to xampp\mysql\bin
    Open my.ini
    Change "max_allowed_packet" from "1m" to "16m"
    Save my.ini
    Now restart MySql through the XAMPP control panel.



Or

settings.php

ini_set('max_allowed_packet', '1024M');