Project

General

Profile

How to know what is wrong when I get an error 503

Added by TH-Gemini over 13 years ago

Hello,

I am trying to install the Firefox sync server on my own lighttpd. However, altough user creation is OK, I can't login and get 503 errors instead.

Informations : 

— Mandriva Linux 2010.1 ;
— Lighttpd 1.4.26 ;
— Client used : Firefox sync 1.5 (a module for firefox) ;
— Configuration file : see quote below.
server.modules              = (
                               "mod_rewrite",
                               "mod_redirect",
                               "mod_alias",
                               "mod_access",
                               "mod_auth",
                               "mod_fastcgi",
                               "mod_compress",
                               "mod_accesslog" )

server.document-root = "/var/www/html/www.mon_site.tld"       
server.errorlog = "/var/log/lighttpd/www.mon_site.tld.error.log" 

index-file.names            = ( "index.php", "index.html",
                                "index.htm", "default.htm" )
mimetype.assign             = (
  ".pdf"          =>      "application/pdf",
  ".sig"          =>      "application/pgp-signature",
  ".spl"          =>      "application/futuresplash",
  ".class"        =>      "application/octet-stream",
  ".ps"           =>      "application/postscript",
  ".torrent"      =>      "application/x-bittorrent",
  ".dvi"          =>      "application/x-dvi",
  ".gz"           =>      "application/x-gzip",
  ".pac"          =>      "application/x-ns-proxy-autoconfig",
  ".swf"          =>      "application/x-shockwave-flash",
  ".tar.gz"       =>      "application/x-tgz",
  ".tgz"          =>      "application/x-tgz",
  ".tar"          =>      "application/x-tar",
  ".zip"          =>      "application/zip",
  ".mp3"          =>      "audio/mpeg",
  ".m3u"          =>      "audio/x-mpegurl",
  ".wma"          =>      "audio/x-ms-wma",
  ".wax"          =>      "audio/x-ms-wax",
  ".ogg"          =>      "application/ogg",
  ".wav"          =>      "audio/x-wav",
  ".gif"          =>      "image/gif",
  ".jar"          =>      "application/x-java-archive",
  ".jpg"          =>      "image/jpeg",
  ".jpeg"         =>      "image/jpeg",
  ".png"          =>      "image/png",
  ".xbm"          =>      "image/x-xbitmap",
  ".xpm"          =>      "image/x-xpixmap",
  ".xwd"          =>      "image/x-xwindowdump",
  ".css"          =>      "text/css",
  ".html"         =>      "text/html",
  ".htm"          =>      "text/html",
  ".js"           =>      "text/javascript",
  ".asc"          =>      "text/plain",
  ".c"            =>      "text/plain",
  ".cpp"          =>      "text/plain",
  ".log"          =>      "text/plain",
  ".conf"         =>      "text/plain",
  ".text"         =>      "text/plain",
  ".txt"          =>      "text/plain",
  ".dtd"          =>      "text/xml",
  ".xml"          =>      "text/xml",
  ".mpeg"         =>      "video/mpeg",
  ".mpg"          =>      "video/mpeg",
  ".mov"          =>      "video/quicktime",
  ".qt"           =>      "video/quicktime",
  ".avi"          =>      "video/x-msvideo",
  ".asf"          =>      "video/x-ms-asf",
  ".asx"          =>      "video/x-ms-asf",
  ".wmv"          =>      "video/x-ms-wmv",
  ".bz2"          =>      "application/x-bzip",
  ".tbz"          =>      "application/x-bzip-compressed-tar",
  ".tar.bz2"      =>      "application/x-bzip-compressed-tar",               
  ""              =>      "application/octet-stream",
 )

accesslog.filename = "/var/log/lighttpd/www.mon_site.tld.access.log"             
url.access-deny             = ( "~", ".inc" )

$HTTP["url"] =~ "\.pdf$" {
  server.range-requests = "disable" 
}

static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )

fastcgi.server             = ( ".php" =>
                               ( "localhost" =>
                                 (
                                   "socket" => "/var/run/lighttpd/php-fastcgi.socket",
                                   "bin-path" => "/usr/bin/php-fcgi",
                                   "max-procs" => 2,
                                   "idle-timeout" => 20,
                                   "bin-environment" => (
                                        "PHP_FCGI_CHILDREN" => "8",
                                        "PHP_FCGI_MAX_REQUESTS" => "2000" 
                                   ),
                                   "bin-copy-environment" => (
                                        "PATH", "SHELL", "USER" 
                                   ),
                                   "broken-scriptfilename" => "enable" 
                                 )
                             )
                         )

$HTTP["url"] =~"/weave/" {
        server.document-root = "/var/www/html/weave.mon_site.tld" 
        server.errorlog = "/var/log/lighttpd/weave.mon_site.tld.error.log" 
        accesslog.filename = "/var/log/lighttpd/weave.mon_site.tld.access.log" 

        alias.url = ("/weave/1.0" => "/var/www/html/weave.mon_site.tld/weave-synchronisation/1.0/index.php")
        alias.url += ("/weave/user/1.0" => "/var/www/html/weave.mon_site.tld/weave-enregistrement/1.0/index.php")
        alias.url += ("/weave/misc/1.0/captcha_html" => "/var/www/html/weave.mon_site.tld/weave-enregistrement/1.0/captcha.php")
}

What I would like is to know how I can understand why does lighttpd returns 503 errors.

Thank you !


Replies (2)

RE: How to know what is wrong when I get an error 503 - Added by nitrox over 13 years ago

This must not necessarily be lighty, it could be your backend which sets that header and lighty just piping it to the client. So i´d suggest you debug your backend first. PHP has its own log files, maybe enable it and have a look there.

RE: How to know what is wrong when I get an error 503 - Added by TH-Gemini over 13 years ago

That was a quick and short answer but … that actually was the perfect one. Thank you !

The problem was indeed in the .php, where an exception was thrown in the code. Thanks again.

    (1-2/2)