Drupal "The connection was reset"

Common Drupal problem when working localy with a remote dumped db

Published: 06 May 2010
Author: Serban Ghita

I'm working on this blog on a local computer at home. I usualy modify the design and activate couple of modules to see how they perform before putting them live. Every day i am using a fresh MySQL database dump from my hosting provider GoDaddy, because i want to make sure i'm working with the latest data possible.

Localy my Drupal is configured to work without any optimizations.

However, on the remote production server i have it configured with the following 'Performance' options at admin/settings/performance:

  • Caching mode: Normal
  • Page compression: Enabled
  • Block cache: Enabled
  • Optimize CSS files: Enabled
  • Optimize JavaScript files: Enabled

What happened is that i dumped the live database on my local server and i got 'The connection was reset' in my browser when accessing http://ghita.org.local/

How to solve the problem

I used phpMyAdmin to browse to my database. Locate the `variable` table, then look for the following variable names: cache, page_compression, block_cache, preprocess_css, preprocess_js and reset them:

#reset the cache configuration
UPDATE `variable` SET `value` = 's:0:"";' WHERE `name` = 'cache' LIMIT 1; 
UPDATE `variable` SET `value` = 's:0:"";' WHERE `name` = 'page_compression' LIMIT 1; 
UPDATE `variable` SET `value` = 's:0:"";' WHERE `name` = 'block_cache' LIMIT 1; 
UPDATE `variable` SET `value` = 's:0:"";' WHERE `name` = 'preprocess_css' LIMIT 1; 
UPDATE `variable` SET `value` = 's:0:"";' WHERE `name` = 'preprocess_js' LIMIT 1;

#empty the cache tables (main ones)
TRUNCATE `cache`;
TRUNCATE `cache_block`;
TRUNCATE `cache_content`;

After issuing this commands my local site started working.

Comments

rahul m
Written on: 24 July 2010

Thanks man ...... it saved my time :)

Silviu
Written on: 22 June 2010

Hey! Thanks for the hint! I've already lost a couple of days trying to solve this problem. By the way ... I love Drupal but sometimes .... I don't :).

Too many particular detalis ....

Anyway ... it s the best CMS ever!

Merci inca o data si spor la treaba!

serban
Written on: 22 June 2010

I feel for you man. It takes some time to get "the Drupal way". You can shorten the path by checking out the videos at http://store.lullabot.com/. Spor!

Kev
Written on: 21 June 2010

Thanks, really helped me.

ch_masson
Written on: 21 June 2010

Excellent!

However, could you please explain what was happening?

This is what I current have in the "variable" table

cache s:1:"1";
page_compression s:1:"1";
block_cache s:1:"1";
preprocess_css s:1:"0";
preprocess_js s:1:"0";

Why is this generating a "connection was reset" message? What's wrong with this?

Thanks for your insight! :)

serban
Written on: 21 June 2010

Hi ch_masson,

For the moment i can only reproduce this on Windows, and i cannot find anything in the Apache or PHP logs. I think it's a memory allocation problem.
Also take a look at http://drupal.org/node/752592

What theme are you using?

Written on: 19 June 2010

Fixed it! Thanks!

Chris H
Written on: 14 June 2010

thanks man! worked great!

Brian Dyer Stewart
Written on: 27 May 2010

After many unsuccessful attempts with other techniques, this did the trick. Thanks so much.

Written on: 15 May 2010

Great article.
It worked great.

Post new comment

The content of this field is kept private and will not be shown publicly.