Drupal hang, when trying cache-clear

Hello,
I run Drupal both in a shared hosting environment and my own, self-maintained testing system. Both systems are Debian 8, Apache2, Mysql 5.5 and PHP 5.6. My test system is (at least to my knowledge!) a complete replica of the production system.
I have no problem when clearing the cache on the test system, using either the GUI or drush. However Drupal “hangs” when clearing the cache on the production system where, unfortunately I don’t have access to the command-line and therefore drush. Looking at both used php.ini files, I thought the hang was due to less memory (96MB) being available in the shared hosting environment (512MB are available as per php.ini in the testing situation).
However, increasing the memory_limit to the same 512MB didn’t make a difference, Drupal still hangs on cache-clear. There is one difference, however: In the shared hosting environment a 60 seconds activity timeout is defined for the MySQL server/client connection, whereas on my testing system of course NO timeout is specified. I wonder whether this might be the reason for the hang. Below I am enclosing the error message I get displayed in the browser, which also seems to suggest that the timeout might be the cause:
—————————————————–
Fatal error: Uncaught exception ‘PDOException’ with message ‘SQLSTATE[HY000]: General error: 2006 MySQL server has gone away’ in /var/home/rainermusik_at/www/includes/database/database.inc:2227
Stack trace:
#0 /var/home/rainermusik_at/www/includes/database/database.inc(2227): PDOStatement->execute(Array)
#1 /var/home/rainermusik_at/www/includes/database/database.inc(697): DatabaseStatementBase->execute(Array, Array)
#2 /var/home/rainermusik_at/www/includes/database/database.inc(2406): DatabaseConnection->query(‘SELECT expire, …’,
Array, Array)
#3 /var/home/rainermusik_at/www/includes/lock.inc(167): db_query(‘SELECT expire, …’, Array)
#4 /var/home/rainermusik_at/www/includes/lock.inc(146): lock_may_be_available(‘schema:runtime:…’)
#5 /var/home/rainermusik_at/www/includes/bootstrap.inc(433): lock_acquire(‘schema:runtime:…’)
#6 /var/home/rainermusik_at/www/includes/bootstrap.inc(455): DrupalCacheArray->set(Array)
#7 [internal function]: DrupalCacheArray->__destruct()
#8 {main} thrown in /var/home/rainermusik_at/www/includes/database/database.inc on line 2227

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at [no address given] to inform them of the time this error occurred, and the
actions you performed just before this error.
More information about this error may be available in the server error log.
—————————————————–
I would very much be interested in your opinions. My problem is that I cannot increase the timeout-value for MySQL
Regards
H. Stoellinger
Salzburg, Austria

Drupal version: 


Source: https://www.drupal.org/taxonomy/term/22/feed