Drupal "The connection was reset"

Common Drupal problem when working localy with a remote dumped db

Published on May 06, '10
by Serban Ghita
19
Comment
ShareThis

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

dicix
Written on: 15 May 2010

Great article.
It worked great.

Guest
Written on: 01 July 2011

How can i find that variables????pls help me..i don't know how to use the program

Brian Dyer Stewart
Written on: 27 May 2010

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

Chris H
Written on: 14 June 2010

thanks man! worked great!

Guest
Written on: 19 June 2010

Fixed it! Thanks!

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.ghita
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?

Kev
Written on: 21 June 2010

Thanks, really helped me.

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.ghita
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!

rahul m
Written on: 24 July 2010

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

Guest
Written on: 22 September 2010

This worked like a charm. I recovered from "connection reset" in no time, after finding this article. Great work!! People like you make drupal a great CMS. Thanks ver much.

-Saurabh

Kristofer
Written on: 08 October 2010

Thanks a bunch! Was ready to jump out the window when I found this... :)

Shilpa
Written on: 21 October 2010

Thanks a lot. It worked. I wasted lot of time on it.

Guest
Written on: 24 November 2010

thanks.. this was a solution for me as well...

Ravy
Written on: 01 March 2011

It worked for me too..thanx

Useradvocate
Written on: 24 June 2011

Like so many others here I was ready to [can't repeat that here] after 2 days of trying to get virtual hosts to work on Win7. Had no idea the problem would be lurking in the database!

Thanks much for sharing this info!

Michael Keara
@useradvocate

vishal
Written on: 26 June 2011

Hi,
I am unable to get this done as I am using durpal 7 and I think this was done for durpal 6.

I am using fatcow servers and their tech have given up on my problem saying its my isp and application issue not theirs.

I was hoping u can give pointers for d7 too.

Cheers,
Vishal

vkudrinsky
Written on: 14 September 2011

This is excellent. Thank you very much!!!

Post new comment

This blog is intended to foster polite on-topic discussions. Comments failing these requirements and spam will not get published.