Hello, Newbie here. Having random and unexpected errors on the client side of my website http://bbcnepalidrama.com . The most recent problem is

Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data.

I got this error about two weeks ago. I tried to kind of fix it by disabling some modules and disabling the cron as well. The problem was fixed temporarily. But again after two weeks I am having the same problem again. I cannot access both admin and front end. I tried to search the forum but found no solution. I am not sure why I am having this problem. Please guys, I know you are very smart and expert than me. This problem could be so easy for you to solve. I am desperately in need of help. Please help me. I will really appreciate that.

Kind Regards
Kamal

Comments

imkamalkumar’s picture

I tried to open the site in different browsers but no luck. I also tried to open it with anonymous proxy (hidemyass) no luck again. I have a php redirect in the root folder of my website as index.php

<?php
$url = "main";
header('HTTP/1.1 301 Moved Permanently');
header('Location: '.$url);
exit;
?>

And I have the drupal installation inside a folder called 'main'
I have two .htaccess files: one in the root folder and another inside the main drupal installation folder
.htaccess in root folder is like this:

addhandler x-httpd-php-cgi .php4
addhandler x-httpd-php5-cgi .php5
addhandler x-httpd-php5-cgi .php

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

And i have another .htaccess inside 'Main' folder which is the drupal installation folder, which is like this

#
# Apache/PHP/Drupal settings:
#

# Protect files and directories from prying eyes.
<FilesMatch "\.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(\..*|Entries.*|Repository|Root|Tag|Template)$">
  Order allow,deny
</FilesMatch>

# Don't show directory listings for URLs which map to a directory.
Options -Indexes

# Follow symbolic links in this directory.
Options +FollowSymLinks

# Multiviews creates problems with aliased URLs and is not needed for Drupal.
Options -Multiviews

# Make Drupal handle any 404 errors.
ErrorDocument 404 /index.php

# Force simple error message for requests for non-existent favicon.ico.
<Files favicon.ico>
  # There is no end quote below, for compatibility with Apache 1.3.
  ErrorDocument 404 "The requested file favicon.ico was not found.
</Files>

# Set the default handler.
DirectoryIndex index.php index.html index.htm

# Override PHP settings that cannot be changed at runtime. See
# sites/default/default.settings.php and drupal_initialize_variables() in
# includes/bootstrap.inc for settings that can be changed at runtime.

# PHP 5, Apache 1 and 2.
<IfModule mod_php5.c>
  php_flag magic_quotes_gpc                 off
  php_flag magic_quotes_sybase              off
  php_flag register_globals                 off
  php_flag session.auto_start               off
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_flag mbstring.encoding_translation    off
</IfModule>

# Requires mod_expires to be enabled.
<IfModule mod_expires.c>
  # Enable expirations.
  ExpiresActive On

  # Cache all files for 2 weeks after access (A).
  ExpiresDefault A1209600

  <FilesMatch \.php$>
    # Do not allow PHP scripts to be cached unless they explicitly send cache
    # headers themselves. Otherwise all scripts would have to overwrite the
    # headers set by mod_expires if they want another caching behavior. This may
    # fail if an error occurs early in the bootstrap process, and it may cause
    # problems if a non-Drupal PHP file is installed in a subdirectory.
    ExpiresActive Off
  </FilesMatch>
</IfModule>

# Various rewrite rules.
<IfModule mod_rewrite.c>
  RewriteEngine on

  # Block access to "hidden" directories whose names begin with a period. This
  # includes directories used by version control systems such as Subversion or
  # Git to store control files. Files whose names begin with a period, as well
  # as the control files used by CVS, are protected by the FilesMatch directive
  # above.
  #
  # NOTE: This only works when mod_rewrite is loaded. Without mod_rewrite, it is
  # not possible to block access to entire directories from .htaccess, because
  # <DirectoryMatch> is not allowed here.
  #
  # If you do not have mod_rewrite installed, you should remove these
  # directories from your webroot or otherwise protect them from being
  # downloaded.
  RewriteRule "(^|/)\." - [F]

  # If your site can be accessed both with and without the 'www.' prefix, you
  # can use one of the following settings to redirect users to your preferred
  # URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
  #
  # To redirect all users to access the site WITH the 'www.' prefix,
  # (http://example.com/... will be redirected to http://www.example.com/...)
  # uncomment the following:
  # RewriteCond %{HTTP_HOST} !^www\. [NC]
  # RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  #
  # To redirect all users to access the site WITHOUT the 'www.' prefix,
  # (http://www.example.com/... will be redirected to http://example.com/...)
  # uncomment the following:
  # RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
  # RewriteRule ^ http://%1%{REQUEST_URI} [L,R=301]

  # Modify the RewriteBase if you are using Drupal in a subdirectory or in a
  # VirtualDocumentRoot and the rewrite rules are not working properly.
  # For example if your site is at http://example.com/drupal uncomment and
  # modify the following line:
  # RewriteBase /drupal
  #
  # If your site is running in a VirtualDocumentRoot at http://example.com/,
  # uncomment the following line:
  # RewriteBase /

  # Pass all requests not referring directly to files in the filesystem to
  # index.php. Clean URLs are handled in drupal_environment_initialize().
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} !=/favicon.ico
  RewriteRule ^ index.php [L]

  # Rules to correctly serve gzip compressed CSS and JS files.
  # Requires both mod_rewrite and mod_headers to be enabled.
  <IfModule mod_headers.c>
    # Serve gzip compressed CSS files if they exist and the client accepts gzip.
    RewriteCond %{HTTP:Accept-encoding} gzip
    RewriteCond %{REQUEST_FILENAME}\.gz -s
    RewriteRule ^(.*)\.css $1\.css\.gz [QSA]

    # Serve gzip compressed JS files if they exist and the client accepts gzip.
    RewriteCond %{HTTP:Accept-encoding} gzip
    RewriteCond %{REQUEST_FILENAME}\.gz -s
    RewriteRule ^(.*)\.js $1\.js\.gz [QSA]

    # Serve correct content types, and prevent mod_deflate double gzip.
    RewriteRule \.css\.gz$ - [T=text/css,E=no-gzip:1]
    RewriteRule \.js\.gz$ - [T=text/javascript,E=no-gzip:1]

    <FilesMatch "(\.js\.gz|\.css\.gz)$">
      # Serve correct encoding type.
      Header append Content-Encoding gzip
      # Force proxies to cache gzipped & non-gzipped css/js files separately.
      Header append Vary Accept-Encoding
    </FilesMatch>
  </IfModule>
</IfModule>

# $Id: .htaccess,v 1.111 2010/11/23 02:59:05 dries Exp $

I also have php.ini file inside the root of my server. Which is like this:

register_globals = off
allow_url_fopen = off

post_max_size = 48M
file_uploads = On
upload_max_filesize = 192M
memory = 20MB
expose_php = Off
max_input_time = 60
variables_order = "EGPCS"
extension_dir = ./
upload_tmp_dir = /tmp
precision = 12
SMTP = relay-hosting.secureserver.net
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset="

[Zend]
zend_extension=/usr/local/zo/ZendExtensionManager.so
zend_extension=/usr/local/zo/4_3/ZendOptimizer.so

Please help :-(

kingandy’s picture

Just off the top of my head, the .htaccess file says this:

  # Modify the RewriteBase if you are using Drupal in a subdirectory or in a
  # VirtualDocumentRoot and the rewrite rules are not working properly.
  # For example if your site is at http://example.com/drupal uncomment and
  # modify the following line:
  # RewriteBase /drupal

If you're running your site in the 'main' subdirectory, I guess you'll need to add a line like this:

RewriteBase /main

++Andy
Developing Drupal websites for Livelink New Media since 2008

imkamalkumar’s picture

thanks, I followed your suggestion. but that did not change anything. I am still having the same problem.

imkamalkumar’s picture

Please guys, help me. I am still having this issue :-(

Jens Peter’s picture

i have this issue lots of time... and I have not been able to do anything.
But a work around can be to go into the database and manual disable a module. In my case I normally disable the last module I installed but most often any module will do fine.
Then the system works again for a little time.

I would love to know a solution this as none of the ideas I have read about and tested have helped me.

renat’s picture

Faced the same problem today. Only one site and it's copy was affected, other Drupal sites on the same host was OK. Apache restart solved this problem, and I'll see, will it emerge again?

haider.saadi’s picture

...since I enabled the content_lock module.

bdimofte’s picture

This issue can be caused by trying to display too many messages.
So if one module generates too many error/warning messages, you'll get no response from the server

mototribe’s picture

had the same problem, a batch script generated too many messages. Clearing the cache with drush didn't fix it, had to reboot.

modulist’s picture

I just had the same issue come up when I migrated a site from one domain to another on Media Temple. The site migrated fine, but this error came up whenever someone tried to log in.

I had drush installed, and so I was able to disable modules without having to log in through the web site. I fixed the problem with

drush dis civicrm

CiviCRM is a module that needs to be configured specifically to the actual domain it's in. Whenever it's moved, CiviCRM throws dozens of error messages. That's why the "too many messages" explanation makes sense.

Thanks for the insight... I was able to resolve the entire issue in about 10-15 minutes.

modulist

lane.angelique’s picture

I'm experiencing the same issue with a client on GoDaddy's VPS.
We first updated their modules to the latest versions, which resolved the issue for a couple of months.

Today, I removed php errors from our htaccess file (probably shouldn't have been there anyway):
php_value display_errors 1
php_value display_startup_errors 1

I also added a couple of rewrites to remove any internal 'dummy' connections:
RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC]
RewriteRule .* - [F,L]
as seen here: http://drupal.org/node/444330#comment-2180658

I'm hoping this will help resolve the issue.

os_pilgrim’s picture

I'm late on this post, more than a year, but I wanted to share how I resolved this problem.

I went through all of the threads that came up when searching with the error message, and there are a wide range of guesses. What cleared it up for me though is increasing PHP memory using the .htaccess file.

I found another thread that discusses ways of configuring memory here http://drupal.org/node/207036. I went through a number of issues installing Drupal 7.x on my host at Media Temple. I documented the entire process in this thread https://forum.mediatemple.net/topic/6786-getting-drupal-to-function/

atomicfrags’s picture

Hi Kamal,

Just know this is not your website's issue but a problem with your internet adapter. Here's how to fix the issue.


Solution 1: Fix ERR_EMPTY_RESPONSE using CMD

I found a list of commands which would reset your network connection and this the error. I prefer trying this fix as mine was fixed using Command Prompt.

1. Run Command Prompt as Administrator

2. Run Command Prompt as Admin.

3. Run all the commands listed:
ipconfig /release
ipconfig /all
ipconfig /flushdns
ipconfig /renewnetsh int ip set dns
netsh winsock reset

4.Restart your PC.

Note: Restarting your PC is crucial and this will reset your network completely, meaning after you restart your PC, all the web pages will start loading and you will not receive the err_empty_response error anymore.


Solution 2: Change your DNS Addresses

I have found another solution which worked for many people. This involves changing your DNS addresses of your network adapter. It’s pretty simple and easy to follow. 😉

Changing DNS Address in Windows PC

1. Open “Network and Sharing Center“.

2. Right-click on Network Adapter.

3. Click on ‘Properties‘.

4. Move to the Networking tab.

5. Double-click on Internet Protocol Version 4 (TCP/IPv4)

6. Use the following DNS addresses:
Preferred DNS Server: 8.8.8.8
Alternate DNS Server:8.8.4.4

Source: Fix err_empty_response in Chrome