Fixing a Slow Registration Form Post on Drupal 7

Fixing a Slow Registration Form Post on Drupal 7

Recently, I was diagnosing some very slow form posts on an installation of Drupal 7.14 on Fedora 16.  A few forms were running painfully slow.  Specifically, the user signup form to register a new user for the site.  If a visitor filled out the register form... the website would just sit forever... like over 60 seconds! Spin, spin, spin... nothing.  A few google searches brought back results pointing to the configuration of sendmail.  If you're not familiar with sendmail, it is an open source mail application that is very commonly used on linux installations.  Sendmail is responsible for sending email.  Right away, the slow forms on Drupal look like a server issue and not a Drupal issue.

The Server Needs Attention!

In this case... the first thing to do, was to jump on the server with ssh and to start looking at the log files.  Looking at the messages, error, and access logs brought back no clues. Looking at the maillog had some interesting entries. Log messages that read, "unable to qualify my own domain name unknown; sleeping for retry" were all over the place. It looked like the server would try to send an email, fail, then retry later. This is why Drupal had the painfully slow form post. The server was unable to deliver an email message in a timely manner.  With a few more google searches, the solution was a simple fix that needed to occur in the /etc/hosts file.  In the hosts file, there are entries that look like:

127.0.0.1 localhost localhost.localdomain
84.23.253.101 MyWebServer

The Solution

With a simple entry into the hosts file, we add the name of your domain to the entry next to your IP address. Below is the new information.

127.0.0.1 localhost localhost.localdomain
84.23.253.101 MyWebServer www.mydomain.com

Once this is set... just save the file.  Restart the sendmail service with service sendmail restart, and you will be off to the races!  The Drupal form now works beautifully!

If your drupal forms are running painfully slow, I hope this information helps you get up and running. Until next time, thanks for stopping by Pro Media Publishing and please leave a comment if there are any questions.

Share this post

Featured Blog Post

Using Twitter, Volume 1
This is the beginning of a series of articles on using the popular messaging service, Twitter.com. The purpose of these articles will...

Stock Photography

About

Hello and welcome to ProMediaPublishing.com!  This is a place where we discuss the ins and outs of building online marketing assets.  We share tools, resources, and tips and tricks to help move your project forward and to help grow your business.  Thanks for stopping by and fee free to contact us if there are any questions.