Drupal Troubleshooting

From DreamHost
Jump to: navigation, search

Latest Versions

The first step in pinning down a problem with any software program is to make sure you have the latest version installed. Please download the latest version from the Drupal.org, and follow the upgrade instructions found in UPGRADE.txt. Also check for security patches and releases. Many high load situations are due to hackers using a vulnerable script to execute high-load commands on the server, or to send out thousands of spam email messages. This taxes the shared servers.

You may have experienced problems that are due to DreamHost upgrading PHP to 5.2. Help threads that may help: http://drupal.org/node/102114 and http://drupal.org/node/92802. Just like it was said earlier in this article: upgrade or patch should be the first troubleshooting solution.

You can often find a solution and or patches for many Drupal problems and Drupal-specific php errors/warning using a site-specific search in google. Use a bit of the error text along with a module name if you know where the source of the problem is coming from.

Domain Setup

Drupal 6 doesn't seem to be compatible with DreamHost's setup of mod_security. Some people suggest a fix using your .htaccess file, but this doesn't seem to work, either, so, for now, you'll have to turn off extra web security in your domain setup.

Drupal Modules

If you have the birthday module enabled, try disabling it. The query that is executed for it will cause your site to be very slow if you have a large number of users (even if you have the module enabled only for registered, logged-in users). Make sure caching is enabled. Make sure the cache and locale tables are optimized by logging into your MySQL database and using the EXPLAIN statement. If you have a lot of modules/blocks enabled, try turning them off one at a time, wait a day, view your reports, and if you see a significant decrease after turning off a module, you'll have found the problem. Drupal module programmers are usually keen to hear feedback from users on their products, so it's generally advisable to submit a report to Drupal regarding the problem module.

Complaints to Dreamhost about optimizing for Drupal

On November 15, 2007 a suggestion to Dreamhost "Make DreamHost Drupal-Friendly" was made through the suggestions system. As of March 28, 2008, Dreamhost had neither discarded, completed or begun progress on this suggestion, according to the Dreamhost panel suggestion interface.

The submitter believed that Dreamhost uses an outdated version of the Zend Optimizer that causes Drupal's Devel module (a critical developer's tool) to crash the site completely. You will have to disable the module completely before using Dreamhost's Zend Optimizer.

The submitter also noted that at times even simple Drupal sites often run painfully slowly on DreamHost (even without additional modules installed), possibly due to a Dreamhost query cache configuration.

Drupal offers a patch for your .htaccess file to remove PHPSESSIDs from URLs, which counters any effort to cache pages since a cached page with a session ID will not load for another user.

Email and Listserve Integration

If you're trying to use MailHandler or ListHandler to populate content in Drupal via email and/or listserve, using the DreamHost standard builds of PHP will cause these Drupal modules to produce an error that the imap_open function is not defined. That's because the imap_open extension is not included in the default PHP compiles offered by DreamHost.

You will have to compile your own custom version of PHP to include the imap_open extension. These Custom compile PHP 5 instuctions are helpful and include the IMAP extension needed for MailHandler or ListHandler.

The Mailhandler does actually work with the Dreamhost default PHP5.3, no need to custom compile PHP. Go to the Mailhandler mailbox settings page, in the Extra commands enter /notls this disables the encrypted session that Dreamhost mailserver would normally start. See the Drupal issue here and See imap_open parameters here

Caching Performance

Drupal also offers a patch for your .htaccess file to remove PHPSESSIDs from URLs, which counters any effort to cache pages since a cached page with a session ID will not load for another user.

Drupal Devel module problems

There is a problem with Zend optimizer 3.2.5 and below with Drupal's Devel module.

Noted here:

Zend Optimizer (versions 3.2.0-3.2.4) causes the debug_backtrace() function to segfault.

You will have to disable the module completely before using with the Dreamhost Zend Optimizer.

Shared v. Dedicated Hosting

If Drupal is still using a lot of resources, it could be that your site has become very popular. While our shared hosting servers are very good at handling quite a bit of traffic from our customers, there does come a point sometimes where a site will outgrow shared hosting and need to move onto the next step - a dedicated server, or Dreamhost PS.

See Also