The connection to the server was reset after trying to log as admin to Drupal
Restart webserver

Might be a webserver issue. Try restarting you webserver and check if it solves your issue.

Check server logs

If that doesn't help either, check your webserver's error log to see if there is any special error message in these that helps.

Tune the .htaccess file

Modified the .htaccess file and replace the default clean URL rewrites with this:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]


Coder module


Option a: Remove the Code module

A complete different reason for this issue is Coder makes Drupal go to "Connection was reset" browser error. So if you have the Coder module installed/enabled, then disable and uninstall it and ALSO remove that module from the module folder.
Option b (if using WAMP): increase the stack size

Be aware that preg_match_all uses the stack which may be too small. PHP crashes and then Apache crashes (and restarts). The fix is to increase the stack size to match a default Linux PHP Apache setup. To do so, increase the Apache stack size to 8MB by adding a line to the end of httpd.conf (surrounded by a IfModule mpm_winnt_module and matching /IfModule tag):


  ThreadStackSize 8388608


After restarting the webserver you can then use any version of the Coder module (and other modules which have this issue ...).

More details: https://www.drupal.org/node/1597820#comment-6094060