Results 1 to 7 of 7
  1. #1

    502 Bad Gateway ApacheBooster/1.6 Error

    Hi.
    On my server Apachebooster installed and it worked fine for about 20 days.
    But Now server work only about 2 hours. Ram usage and Cpu load after 2-3 hours is very high and all site show this error:

    Code:
    502 Bad Gateway
    ApacheBooster/1.6 Error
    I have to reboot server

  2. #2
    Join Date
    Aug 2001
    Posts
    4,539
    The error would indicate the upstream server returned an error. What do the logs say?
    Sitemeer.com ● Multi-Location Service Availability Check
    Not just HTTP! Proper HTTPS support, detailed timing statistics and full IDN compliance


  3. #3
    Quote Originally Posted by zoid View Post
    The error would indicate the upstream server returned an error. What do the logs say?
    Where is apachebooster logs?
    I find a file in this address: /var/log/apachebooster.log
    Contents of this file is: ( I copied a part of this)

    Code:
    [2013-03-19 23:34:30 -0400] info [createvhost] testesteestest kerman20.lock
    [2013-03-19 23:44:56 -0400] info [createvhost] testesteestest khanetar.lock
    [2013-03-19 23:45:48 -0400] info [createvhost] testesteestest khanetar.lock
    [2013-03-19 23:46:02 -0400] info [createvhost] testesteestest khanetar.lock
    [2013-03-20 00:27:12 -0400] info [createvhost] testesteestest khanetar.lock
    [2013-03-20 00:27:15 -0400] info [createvhost] testesteestest khanetar.lock

    A part of Apache Error log is:
    Code:
    [Sat Mar 16 12:03:38 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/loc$
    [Sat Mar 16 12:03:38 2013] [notice] Apache/2.2.24 (Unix) mod_ssl/2.2.24 OpenSSL$
    DBI connect('database=leechprotect:host=localhost','leechprotect',...) failed: $
    [Sat Mar 16 12:04:27 2013] [error] [client 114.80.93.213] File does not exist: $
    [Sat Mar 16 12:05:39 2013] [notice] Graceful restart requested, doing restart
    [Sat Mar 16 12:05:39 2013] [error] (9)Bad file descriptor: apr_socket_accept: ($
    [Sat Mar 16 12:05:39 2013] [notice] Apache/2.2.24 (Unix) mod_ssl/2.2.24 OpenSSL$
    DBI connect('database=leechprotect:host=localhost','leechprotect',...) failed: $
    [Sat Mar 16 12:05:40 2013] [warn] long lost child came home! (pid 20080)
    [Sat Mar 16 12:05:43 2013] [notice] Graceful restart requested, doing restart
    [Sat Mar 16 12:05:43 2013] [error] (9)Bad file descriptor: apr_socket_accept: ($
    [Sat Mar 16 12:05:44 2013] [notice] Apache/2.2.24 (Unix) mod_ssl/2.2.24 OpenSSL$
    DBI connect('database=leechprotect:host=localhost','leechprotect',...) failed: $
    [Sat Mar 16 12:05:45 2013] [warn] long lost child came home! (pid 20163)
    [Sat Mar 16 12:06:31 2013] [notice] Graceful restart requested, doing restart
    [Sat Mar 16 12:06:31 2013] [error] (9)Bad file descriptor: apr_socket_accept: ($
    [Sat Mar 16 12:06:32 2013] [notice] Apache/2.2.24 (Unix) mod_ssl/2.2.24 OpenSSL$
    [Sat Mar 16 12:12:30 2013] [notice] Graceful restart requested, doing restart
    [Sat Mar 16 12:12:30 2013] [error] (9)Bad file descriptor: apr_socket_accept: ($
    [Sat Mar 16 12:12:30 2013] [notice] Graceful restart requested, doing restart
    [Sat Mar 16 12:12:30 2013] [error] (9)Bad file descriptor: apr_socket_accept: ($
    [Sat Mar 16 12:12:30 2013] [notice] Apache/2.2.24 (Unix) mod_ssl/2.2.24 OpenSSL$
    [Sat Mar 16 12:12:52 2013] [error] [client 114.80.93.213] File does not exist: $
    [Sat Mar 16 12:15:37 2013] [notice] caught SIGTERM, shutting down
    [Sat Mar 16 12:17:02 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/loc$
    [Sat Mar 16 12:17:02 2013] [notice] Apache/2.2.24 (Unix) mod_ssl/2.2.24 OpenSSL$
    [Sat Mar 16 12:21:12 2013] [error] [client 114.80.93.213] File does not exist: $
    [Sat Mar 16 12:24:34 2013] [error] [client 114.80.93.213] File does not exist: $
    [Sat Mar 16 12:26:30 2013] [notice] Graceful restart requested, doing restart
    [Sat Mar 16 12:26:30 2013] [notice] Apache/2.2.24 (Unix) mod_ssl/2.2.24 OpenSSL$
    [Sat Mar 16 12:44:32 2013] [notice] Graceful restart requested, doing restart
    [Sat Mar 16 12:44:32 2013] [notice] Apache/2.2.24 (Unix) mod_ssl/2.2.24 OpenSSL$
    [Sat Mar 16 12:52:28 2013] [error] [client 92.240.68.152] File does not exist: $
    [Sat Mar 16 12:56:59 2013] [error] [client 208.115.111.73] File does not exist:$
    [Sat Mar 16 12:56:59 2013] [error] [client 208.115.111.73] File does not exist:$
    [Sat Mar 16 13:02:48 2013] [notice] caught SIGTERM, shutting down
    [Sat Mar 16 13:04:17 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/loc$
    [Sat Mar 16 13:04:17 2013] [notice] Apache/2.2.24 (Unix) mod_ssl/2.2.24 OpenSSL$
    [Sat Mar 16 13:04:17 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/loc$
    [Sat Mar 16 13:04:17 2013] [notice] Apache/2.2.24 (Unix) mod_ssl/2.2.24 OpenSSL$
    [Sat Mar 16 13:05:01 2013] [error] [client 183.232.10.140] File does not exist:$
    [Sat Mar 16 13:05:01 2013] [error] [client 183.232.10.139] File does not exist:$
    [Sat Mar 16 13:05:01 2013] [error] [client 183.232.10.124] File does not exist:$
    [Sat Mar 16 13:05:21 2013] [error] [client 182.118.22.211] File does not exist:$
    [Sat Mar 16 13:05:21 2013] [error] [client 182.118.22.212] File does not exist:$
    [Sat Mar 16 13:13:50 2013] [notice] caught SIGTERM, shutting down
    [Sat Mar 16 13:13:52 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/loc$
    [Sat Mar 16 13:13:52 2013] [notice] Apache/2.2.24 (Unix) mod_ssl/2.2.24 OpenSSL$
    [Sat Mar 16 13:16:41 2013] [notice] SIGHUP received.  Attempting to restart
    [Sat Mar 16 13:16:41 2013] [notice] Apache/2.2.24 (Unix) mod_ssl/2.2.24 OpenSSL$
    [Sat Mar 16 13:17:06 2013] [error] [client 123.125.71.26] File does not exist: $
    [Sat Mar 16 13:17:07 2013] [error] [client 123.125.71.29] File does not exist: $
    [Sat Mar 16 13:31:41 2013] [error] [client 220.181.108.121] File does not exist$
    [Sat Mar 16 13:40:44 2013] [error] [client 208.115.111.73] File does not exist:$
    [Sat Mar 16 13:54:31 2013] [error] [client 123.151.148.171] File does not exist$
    [Sat Mar 16 13:59:56 2013] [error] [client 101.226.169.212] File does not exist$
    [Sat Mar 16 13:59:57 2013] [error] [client 101.226.169.209] File does not exist$

  4. #4
    I think i should change Ram cache time in apachebooster (or varnish).
    What's your idea?
    How to change cache time?

  5. #5
    I want to change cache time. please help me!!!

  6. #6
    I upgrade Apacheebooster to version 1.7 but my problem not fixed.

  7. #7
    It's varnish configuration file:

    Code:
    
     
    ###############################################
    # Created by Prajith
    # http://prajith.in
    #                                              
    ###############################################
    include "/usr/local/varnish/etc/varnish/cpanel.backend.vcl";
    include "/usr/local/varnish/etc/varnish/vhost.vcl";
    
    sub vcl_recv {
    set req.backend = default;
    include "/usr/local/varnish/etc/varnish/acl.vcl";
    include "/usr/local/varnish/etc/varnish/vhost.exclude.vcl";
    set req.grace = 5m;
    
       # Handle IPv6
       if (req.http.Host ~ "^ipv6.*") {
            set req.http.host = regsub(req.http.host, "^ipv6\.(.*)","www\.\1");
       }
    
    
        # Sanitise X-Forwarded-For...
        remove req.http.X-Forwarded-For;
        set req.http.X-Forwarded-For = client.ip;
         include "/usr/local/varnish/etc/varnish/cpanel.url.vcl"; 
        # Remove has_js and Google Analytics cookies.
        set req.http.Cookie = regsuball(req.http.Cookie, "(^|;\s*)(__[a-z]+|has_js)=[^;]*", "");
     
        # Normalize the Accept-Encoding header
        if (req.http.Accept-Encoding) {
            if (req.url ~ "\.(jpg|jpeg|png|gif|gz|tgz|bz2|tbz|mp3|ogg|swf|flv|pdf|ico)$") {
                # No point in compressing these
                remove req.http.Accept-Encoding;
            } elsif (req.http.Accept-Encoding ~ "gzip") {
                set req.http.Accept-Encoding = "gzip";
            } elsif (req.http.Accept-Encoding ~ "deflate") {
                set req.http.Accept-Encoding = "deflate";
            } else {
                # unknown algorithm
                remove req.http.Accept-Encoding;
            }
        }
    
    include "/usr/local/varnish/etc/varnish/url.exclude.vcl"; 
        # Ignore empty cookies
        if (req.http.Cookie ~ "^\s*$") {
            remove req.http.Cookie;
        }
        
              if (req.request == "PURGE") {
            if (!client.ip ~ acl127_0_0_1) {error 405 "Not permitted";}
            return (lookup);
    }
    
        if (req.request != "GET" &&
           req.request != "HEAD" &&
           req.request != "POST" &&
           req.request != "PUT" &&
           req.request != "PURGE" &&
           req.request != "DELETE" ) {
        return (pipe);    
    }
    
        if (req.request != "GET" && req.request != "HEAD") {
            /* We only deal with GET and HEAD by default, the rest get passed direct to backend */
            return (pass);
        }
       
    
    
    if (req.http.Cookie ~ "^\s*$") {
            unset req.http.Cookie;
    }
    
    
        if (req.http.Authorization || req.http.Cookie) {
            return (pass);
        }
     
    set req.url = regsub(req.url, "\.js\?.*", ".js");
    set req.url = regsub(req.url, "\.css\?.*", ".css");
    set req.url = regsub(req.url, "\.jpg\?.*", ".jpg");
    set req.url = regsub(req.url, "\.gif\?.*", ".gif");
    set req.url = regsub(req.url, "\.swf\?.*", ".swf");
    set req.url = regsub(req.url, "\.xml\?.*", ".xml");
    
    # Cache things with these extensions
    if (req.url ~ "\.(js|css|jpg|jpeg|png|gif|gz|tgz|bz2|tbz|mp3|ogg|swf|pdf)$" && ! (req.url ~ "\.(php)") ) {
        unset req.http.Cookie;
        return (lookup);
    }
    
        
    return (lookup);
    }
    
    
    sub vcl_fetch {
    
    set beresp.ttl = 45s;
    set beresp.http.Server = " - ApacheBooster by http://www.prajith.in";
    
    set beresp.do_gzip = true;
    set beresp.do_gunzip = false;
    set beresp.do_stream = false;
    set beresp.do_esi = false;
    
    set beresp.grace = 5m;
    
    unset beresp.http.expires;
    if (req.url ~ "\.(js|css|jpg|jpeg|png|gif|gz|tgz|bz2|tbz|mp3|ogg|swf|pdf|ico)$" && ! (req.url ~ "\.(php)") ) {
            unset beresp.http.set-cookie;
           include  "/usr/local/varnish/etc/varnish/static_file.vcl";
    }
    else {
             include  "/usr/local/varnish/etc/varnish/dynamic_file.vcl";
    }
    
    if (beresp.status == 503 || beresp.status == 500) {
            set beresp.http.X-Cacheable = "NO: beresp.status";
            set beresp.http.X-Cacheable-status = beresp.status;
            return (hit_for_pass);
    }
    
    if (beresp.status == 404) {
            set beresp.http.magicmarker = "1";
            set beresp.http.X-Cacheable = "YES";
            set beresp.ttl = 20s;
            return (deliver);
    }
    
    set beresp.http.magicmarker = "1";
    set beresp.http.X-Cacheable = "YES";
    
    
    }
    sub vcl_deliver {
    
      if (resp.http.magicmarker) {
         /* Remove the magic marker */
         unset resp.http.magicmarker;
    
         set resp.http.age = "0";
       }
    
       if (obj.hits > 0) {
         #if hit add hit count
         set resp.http.X-Cache = "HIT";
         set resp.http.X-Cache-Hits = obj.hits;
       }
    else {
         set resp.http.X-Cache = "MISS";
       }
    
    }

  8. Newsletters

    Subscribe Now & Get The WHT Quick Start Guide!

Similar Threads

  1. 502 Bad Gateway nginx/1.0.15
    By KnowledgeHub in forum VPS Hosting
    Replies: 17
    Last Post: 03-30-2013, 03:14 AM
  2. phpmyadmin 502 Bad Gateway Error !
    By gharch in forum Hosting Software and Control Panels
    Replies: 3
    Last Post: 08-18-2012, 05:33 PM
  3. Nginx 502 bad gateway
    By Ruriko in forum Hosting Security and Technology
    Replies: 10
    Last Post: 08-06-2011, 11:43 PM
  4. 502 Bad Gateway Error - Please Help :(
    By jani in forum Web Hosting
    Replies: 10
    Last Post: 10-11-2010, 08:42 PM
  5. 502 - Bad Gateway Error
    By DaBoss in forum Web Hosting
    Replies: 3
    Last Post: 05-11-2003, 02:10 AM

Related Posts from theWHIR.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •