• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 821
  • Last Modified:

drupal internal server error

on my drupal site, it's running a little slow and i get this pretty often

internal server error


you can simply refresh the page and it's fixed, but this is really really bad, anyone has any idea what the problem might be?
0
charmingduck
Asked:
charmingduck
  • 8
  • 5
  • 3
  • +2
6 Solutions
 
Thomas4019Commented:
What would really provide insight here is you PHP and Apache error logs.

To improve performance, we need to know what your hosting setup is (shared? vps? dedicated? or even multi-server?)
0
 
charmingduckAuthor Commented:
WHERE CAN I GO SEE THE ERROR LOGS?
0
 
charmingduckAuthor Commented:
AND IM WITH GODADDY, I DONT KNOW WHAT KIND OF SERVER IT IS
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
ellyjonezCommented:
sounds like your site may be having memory issues. do you have caching turned on? if you have devel module installed, and can use it to look at your php info, what is the memory limit for the site?
0
 
danyellCommented:
ellyjonez has mentioned the most likely cause of this problem.

Try adding this line to the .htaccess file located at your Web stie's root folder:

php_value memory_limit 64M

here 64M is just an example, obviously more is better, but the maximum allowed depends on the kind of account you got from goDaddy.
0
 
nasirbestCommented:
Oftenly shared hosting (like godday) crowded by too many websites, which results in bad performance like one as you experiencing now! In this situation you can not fix it by yourself, even with drupal cashing etc.. nothing will help.

Contact with godday and let them know the issue and ask them to move your website to some less crowded server. It will solve performance issue for a while.

But if your running a valuable site then it is highly recommend to move to a dedicated or at least low cost VPS server
0
 
Thomas4019Commented:
I use godaddy too and it's slow as well. Probably the best thing to do would be move. However, I was able to sucessfully increase the PHP memory limit to 128 MB so that helped me alot.

In your site root there should be a file php5.ini. Add this snippet to it.
memory_limit = 128M

Open in new window

0
 
Thomas4019Commented:
By the way you're probably referring to a shared hosting which is the cheap a couple dollar a month plans with GoDaddy. The next step up is a Virtual Private Server (VPS).

Shared hosting simply will not work for large websites.
0
 
charmingduckAuthor Commented:
Do you think it might be the scripting error in the htaccess file?


www.ex.com
www.ex.com/drupal617

my actual site is under drupal617, but with mod_rewrite, you can also go to www.ex.com





there's one in the root directory, see the first code

there's another one here, under  www.ex.com/drupal617, and the only difference is below

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


and in the settings.php file, i have this

 $base_url = 'http://www.ex.com';  // NO trailing slash!

#
# 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|svn-base)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template|all-wcprops|entries|format)$">
  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

# 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

# Override PHP settings. More in sites/default/settings.php
# but the following cannot be changed at runtime.



# PHP 4, Apache 1.
<IfModule mod_php4.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_value mbstring.encoding_translation   0
</IfModule>

# PHP 4, Apache 2.
<IfModule sapi_apache2.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_value mbstring.encoding_translation   0
</IfModule>

# PHP 5, Apache 1 and 2.
<IfModule mod_php5.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_value mbstring.encoding_translation   0
</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

  # 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/...)
  # adapt and uncomment the following:
  # RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
  # RewriteRule ^(.*)$ http://www.example.com/$1 [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 and adapt the following:
  # RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
  # RewriteRule ^(.*)$ http://example.com/$1 [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 /



  ### BOOST START ###
  AddDefaultCharset utf-8
  <FilesMatch "(\.html|\.html\.gz)$">
    <IfModule mod_headers.c>
      Header set Expires "Sun, 19 Nov 1978 05:00:00 GMT"
      Header set Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0"
    </IfModule>
  </FilesMatch>
  <IfModule mod_mime.c>
    AddCharset utf-8 .html
    AddCharset utf-8 .css
    AddCharset utf-8 .js
    AddEncoding gzip .gz
  </IfModule>
  <FilesMatch "(\.html|\.html\.gz)$">
    ForceType text/html
  </FilesMatch>
  <FilesMatch "(\.js|\.js\.gz)$">
    ForceType text/javascript
  </FilesMatch>
  <FilesMatch "(\.css|\.css\.gz)$">
    ForceType text/css
  </FilesMatch>

  # Gzip Cookie Test
  RewriteRule boost-gzip-cookie-test\.html  cache/perm/boost-gzip-cookie-test\.html\.gz [L,T=text/html]

  # GZIP - Cached css & js files
  RewriteCond %{HTTP_COOKIE} !(boost-gzip)
  RewriteCond %{HTTP:Accept-encoding} !gzip
  RewriteRule .* - [S=2]
  RewriteCond %{DOCUMENT_ROOT}/drupal617/cache/perm/%{SERVER_NAME}%{REQUEST_URI}_\.css\.gz -s
  RewriteRule .* cache/perm/%{SERVER_NAME}%{REQUEST_URI}_\.css\.gz [L,QSA,T=text/css]
  RewriteCond %{DOCUMENT_ROOT}/drupal617/cache/perm/%{SERVER_NAME}%{REQUEST_URI}_\.js\.gz -s
  RewriteRule .* cache/perm/%{SERVER_NAME}%{REQUEST_URI}_\.js\.gz [L,QSA,T=text/javascript]

  # NORMAL - Cached css & js files
  RewriteCond %{DOCUMENT_ROOT}/drupal617/cache/perm/%{SERVER_NAME}%{REQUEST_URI}_\.css -s
  RewriteRule .* cache/perm/%{SERVER_NAME}%{REQUEST_URI}_\.css [L,QSA,T=text/css]
  RewriteCond %{DOCUMENT_ROOT}/drupal617/cache/perm/%{SERVER_NAME}%{REQUEST_URI}_\.js -s
  RewriteRule .* cache/perm/%{SERVER_NAME}%{REQUEST_URI}_\.js [L,QSA,T=text/javascript]

  # Caching for anonymous users
  # Skip boost IF not get request OR uri has wrong dir OR cookie is set OR request came from this server OR https request
  RewriteCond %{REQUEST_METHOD} !^(GET|HEAD)$ [OR]
  RewriteCond %{REQUEST_URI} (^/drupal617/(admin|cache|misc|modules|sites|system|openid|themes|node/add))|(/(comment/reply|edit|user|user/(login|password|register))$) [OR]
  RewriteCond %{HTTP_COOKIE} DRUPAL_UID [OR]
  RewriteCond %{HTTP:Pragma} no-cache [OR]
  RewriteCond %{HTTP:Cache-Control} no-cache [OR]
  RewriteCond %{HTTPS} on
  RewriteRule .* - [S=3]

  # GZIP
  RewriteCond %{HTTP_COOKIE} !(boost-gzip)
  RewriteCond %{HTTP:Accept-encoding} !gzip
  RewriteRule .* - [S=1]
  RewriteCond %{DOCUMENT_ROOT}/drupal617/cache/normal/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.html\.gz -s
  RewriteRule .* cache/normal/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.html\.gz [L,T=text/html]

  # NORMAL
  RewriteCond %{DOCUMENT_ROOT}/drupal617/cache/normal/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.html -s
  RewriteRule .* cache/normal/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.html [L,T=text/html]

  ### BOOST END ###



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



</IfModule>

# $Id: .htaccess,v 1.90.2.5 2010/02/02 07:25:22 dries Exp $

Open in new window

0
 
Thomas4019Commented:
Rewrite rules shouldn't produce unpredictable results. The fact that refreshing fixes it makes me think your problem has nothing with rewrite rules.

Posting the result of example.com/admin/reports/status would be helpful.
0
 
charmingduckAuthor Commented:
please see attached, do you think it might be the boost module code in htaccess?


Picture-163.png
0
 
Thomas4019Commented:
0
 
nasirbestCommented:
FYI

During crawling search engine bots get same experience as real person. And bad performance like this can result in low SEO ranking or even website ban from search engines!

So you have to fix performance issue ASAP!
0
 
Thomas4019Commented:
He's got Boost installed (a great choice), so search engines should get pages fast.
0
 
Thomas4019Commented:
But it looks like it might be disabled, Boost really should be enabled.
0
 
charmingduckAuthor Commented:
Yeah, i think it needs to be fixed asap.

I'm constantly making changes so that's why i disabled the boost module. I think moving the site back to the root directory can fix the 500 error, hopefully.

But I dont know what to do with the speed, I called godaddy and they said the site is running fast(well, of course, i mean the server is probably right next to them), and they can't fix the 500 internal server error because they can't see it at all. And the VPS is just too expensive.

I was under the impression that godaddy used to have very good technical support. But now every time you call, either it's my problem or they dont know ****.
0
 
Thomas4019Commented:
Are your users going to be primarily authenticated? If not, then Boost will solve all your problems.

If you are going to have a lot of logged in users, then AuthCache might work for you, http://drupal.org/project/authcache.

Those seem to be pretty much the only options for speeding up sites on shared hosting.

Also see these,
http://www.leveltendesign.com/node/1475
http://2bits.com/articles/tips-on-speeding-up-your-drupal-sites.html

Also, make sure you have CSS and JS Aggregation turned on.

These addons can help tell you why your site's slow.
http://developer.yahoo.com/yslow/
http://code.google.com/speed/page-speed/
0
 
nasirbestCommented:
expensive! not always If you can handle linux well then go for "unmanaged vps" see http://wooservers.com/vps/ 

I have experienced same problem for my drupal websites. it is difficult for hosting support to detect this error cos it only happen during server peek time
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 8
  • 5
  • 3
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now