Sponsor:

Server and Web Integrator
Link:
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2024-03-28, 20:04:56

Author Topic: The connection was reset  (Read 24414 times)

0 Members and 1 Guest are viewing this topic.

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: The connection was reset
« Reply #15 on: 2013-01-15, 16:43:53 »
Here's my config:

Code: [Select]
#!/bin/bash
#
# httpd        Startup script for the Apache HTTP Server
#
# chkconfig: - 85 15
# description: The Apache HTTP Server is an efficient and extensible  
#              server implementing the current HTTP standards.
# processname: httpd
# config: /etc/httpd/conf/httpd.conf
# config: /etc/sysconfig/httpd
# pidfile: /var/run/httpd.pid
#
### BEGIN INIT INFO
# Provides: httpd
# Required-Start: $local_fs $remote_fs $network $named
# Required-Stop: $local_fs $remote_fs $network
# Should-Start: distcache
# Short-Description: start and stop Apache HTTP Server
# Description: The Apache HTTP Server is an extensible server
#  implementing the current HTTP standards.
### END INIT INFO

# Source function library.
. /etc/rc.d/init.d/functions

if [ -f /etc/sysconfig/httpd ]; then
        . /etc/sysconfig/httpd
fi

# Start httpd in the C locale by default.
HTTPD_LANG=${HTTPD_LANG-"C"}

# This will prevent initlog from swallowing up a pass-phrase prompt if
# mod_ssl needs a pass-phrase from the user.
INITLOG_ARGS=""

# Set HTTPD=/usr/sbin/httpd.worker in /etc/sysconfig/httpd to use a server
# with the thread-based "worker" MPM; BE WARNED that some modules may not
# work correctly with a thread-based MPM; notably PHP will refuse to start.

# Path to the apachectl script, server binary, and short-form for messages.
apachectl=/usr/sbin/apachectl
httpd=${HTTPD-/usr/sbin/httpd}
prog=httpd
pidfile=${PIDFILE-/var/run/httpd.pid}
lockfile=${LOCKFILE-/var/lock/subsys/httpd}
RETVAL=0

# The semantics of these two functions differ from the way apachectl does
# things -- attempting to start while running is a failure, and shutdown
# when not running is also a failure.  So we just do it the way init scripts
# are expected to behave here.
start() {
        echo -n $"Starting $prog: "
        LANG=$HTTPD_LANG daemon --pidfile=${pidfile} $httpd $OPTIONS
        RETVAL=$?
        echo
        [ $RETVAL = 0 ] && touch ${lockfile}
        return $RETVAL
}

# When stopping httpd a delay of >10 second is required before SIGKILLing the
# httpd parent; this gives enough time for the httpd parent to SIGKILL any
# errant children.
stop() {
        echo -n $"Stopping $prog: "
        killproc -p ${pidfile} -d 10 $httpd
        RETVAL=$?
        echo
        [ $RETVAL = 0 ] && rm -f ${lockfile} ${pidfile}
}
reload() {
    echo -n $"Reloading $prog: "
    if ! LANG=$HTTPD_LANG $httpd $OPTIONS -t >&/dev/null; then
        RETVAL=$?
        echo $"not reloading due to configuration syntax error"
        failure $"not reloading $httpd due to configuration syntax error"
    else
        killproc -p ${pidfile} $httpd -HUP
        RETVAL=$?
    fi
    echo
}

# See how we were called.
case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  status)
        status $httpd
        RETVAL=$?
        ;;
  restart)
      $apachectl $@
        RETVAL=$?
        ;;
  condrestart)
        if [ -f ${pidfile} ] ; then
                stop
                start
        fi
        ;;
  force-reload|reload)
        reload
        ;;
  graceful|help|configtest|fullstatus)
        $apachectl $@
        RETVAL=$?
        ;;
  *)
        echo $"Usage: $prog {start|stop|restart|condrestart|reload|status|fullstatus|graceful|help|configtest}"
        RETVAL=3
esac

exit $RETVAL
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline Anik

  • Senior Member
  • *
  • Posts: 189
  • Karma: +0/-0
    • View Profile
    • http://www.feirox.com
Re: The connection was reset
« Reply #16 on: 2013-01-15, 18:11:55 »
now theres 2. should i apply both fixes?  : :
« Last Edit: 1970-01-01, 01:00:00 by Guest »
Having Kloxo-MR useful? Then support the development. Consider buying a server from the author. http://hostspectra.com

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: The connection was reset
« Reply #17 on: 2013-01-15, 18:22:56 »
Quote from: "Anik"
now theres 2. should i apply both fixes?  : :

No just replace your /etc/init.d/httpd with the last one.
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline Anik

  • Senior Member
  • *
  • Posts: 189
  • Karma: +0/-0
    • View Profile
    • http://www.feirox.com
Re: The connection was reset
« Reply #18 on: 2013-01-15, 19:33:57 »
ok i replaced with Marek's config. but if i don't apply Mustafa's fix then he will be angry ->  :evil:
so tellme Mustafa, should i apply yours too?  :D
« Last Edit: 1970-01-01, 01:00:00 by Guest »
Having Kloxo-MR useful? Then support the development. Consider buying a server from the author. http://hostspectra.com

Offline Anik

  • Senior Member
  • *
  • Posts: 189
  • Karma: +0/-0
    • View Profile
    • http://www.feirox.com
Re: The connection was reset
« Reply #19 on: 2013-01-15, 19:37:15 »
another point i want to mention. my php-fpm expires after some times. maybe 24 hours or less. so i have to restart it periodically.
is it related to this matter?
« Last Edit: 1970-01-01, 01:00:00 by Guest »
Having Kloxo-MR useful? Then support the development. Consider buying a server from the author. http://hostspectra.com

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: The connection was reset
« Reply #20 on: 2013-01-15, 20:12:23 »
I hope you can try my modification.

I think, changing option on 'switch applications' and 'webserver configs' need restart service, but add/modified/delete domains (it's related to service configs) don't need restart service. Just enough reload.

If this modification running well, final release will be use this modification.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: The connection was reset
« Reply #21 on: 2013-01-15, 23:30:15 »
No, no, no !

Reload won't add new domains etc.

It must be graceful !

"A reload is not sufficient as it does not reload the SSL certificates if there are changes there. Any new VirtualHosts, new domain, new subdoman, etc.. (even if they use the same certs) require a new read of the certs, and reload doesn't do this.

A restart is required... however, the graceful restart, mentioned above, can do a full restart without interruption of current connections."
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline Anik

  • Senior Member
  • *
  • Posts: 189
  • Karma: +0/-0
    • View Profile
    • http://www.feirox.com
Re: The connection was reset
« Reply #22 on: 2013-01-16, 13:21:41 »
So guys, there is now two modification. with which i should stick with?
Marek, did you ever got that connection reset problem in browser after applying your graceful restart fix on your own server?
Mustafa, you can try Marek's fix if he is certain that this problem won't happen again.
I am now watching the server and will update with further information, because this problem do not occurs always.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
Having Kloxo-MR useful? Then support the development. Consider buying a server from the author. http://hostspectra.com

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: The connection was reset
« Reply #23 on: 2013-01-16, 16:07:27 »
Quote from: "Anik"
So guys, there is now two modification. with which i should stick with?
Marek, did you ever got that connection reset problem in browser after applying your graceful restart fix on your own server?
Mustafa, you can try Marek's fix if he is certain that this problem won't happen again.
I am now watching the server and will update with further information, because this problem do not occurs always.
I know about proposal. But, I don't like this approach where with this approach to modified init config file.

As we know, some services have 'restart', 'reload' and 'graceful'. But 'graceful' not always exists.

I have a plan (I hope implementing on next release), when Kloxo 'restart' (that mean running createRestart) certain service (say it, httpd) then Kloxo process this depend on 'restart' type ( 'restart', 'reload', 'graceful' or others) form 'listing' file.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: The connection was reset
« Reply #24 on: 2013-01-16, 23:37:19 »
Quote from: "Anik"
Marek, did you ever got that connection reset problem in browser after applying your graceful restart fix on your own server?

Almost never. Only 0,03% connections to my Varnish failed (probably due to some kernel swapping error):

Quote
client_conn            1383757        16.23 Client connections accepted
client_drop                  0         0.00 Connection dropped, no sess/wrk
client_req             3174663        37.24 Client requests received
cache_hit               365940         4.29 Cache hits
cache_hitpass               45         0.00 Cache hits for pass
cache_miss             2706253        31.74 Cache misses
backend_conn            188075         2.21 Backend conn. success
backend_unhealthy            0         0.00 Backend conn. not attempted
backend_busy                 0         0.00 Backend conn. too many
backend_fail              2459         0.03 Backend conn. failures
backend_reuse          2807769        32.93 Backend conn. reuses
backend_toolate         100708         1.18 Backend conn. was closed
backend_recycle        2908890        34.12 Backend conn. recycles
backend_retry              635         0.01 Backend conn. retry
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline Anik

  • Senior Member
  • *
  • Posts: 189
  • Karma: +0/-0
    • View Profile
    • http://www.feirox.com
Re: The connection was reset
« Reply #25 on: 2013-01-17, 13:06:36 »
Quote
I have a plan (I hope implementing on next release),

So should we wait for the next release?  is upgrading from the current release will be okay? before i got some serious problem for which i need to reinstall everything, so now i fear to upgrade.  :|

Quote
backend_unhealthy 0 0.00 Backend conn. not attempted
backend_busy 0 0.00 Backend conn. too many
backend_fail 2459 0.03 Backend conn. failures
backend_reuse 2807769 32.93 Backend conn. reuses
backend_toolate 100708 1.18 Backend conn. was closed

where you get this stat?
« Last Edit: 1970-01-01, 01:00:00 by Guest »
Having Kloxo-MR useful? Then support the development. Consider buying a server from the author. http://hostspectra.com

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: The connection was reset
« Reply #26 on: 2013-01-18, 01:41:16 »
Create varnish.php and put this inside the file:

Code: [Select]
<?php
// ==============================
// Server Uptime And Hardware Information |
// ==============================
?>


<html>
<head>
<title><?php echo $SERVER_NAME?> - Varnish Stat</title>
<STYLE type=text/css>
BODY { FONT-SIZE: 8pt; COLOR: black; FONT-FAMILY: Verdana,arial, helvetica, serif; margin : 0 0 0 0;}
</STYLE>
</head>
<body>
<pre>

<?php system("varnishstat -1"); ?>

</pre>
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline Tsanten

  • Global Moderator
  • Junior Member
  • *****
  • Posts: 49
  • Karma: +0/-0
    • View Profile
Re: The connection was reset
« Reply #27 on: 2013-01-18, 11:56:28 »
Or ssh varnishstat -1
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline Anik

  • Senior Member
  • *
  • Posts: 189
  • Karma: +0/-0
    • View Profile
    • http://www.feirox.com
Re: The connection was reset
« Reply #28 on: 2013-01-18, 13:44:18 »
Failed. PHP returned a WSOD
ssh varnishstat: command not found

should i need to install varnishstat via yum?
« Last Edit: 1970-01-01, 01:00:00 by Guest »
Having Kloxo-MR useful? Then support the development. Consider buying a server from the author. http://hostspectra.com

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: The connection was reset
« Reply #29 on: 2013-01-18, 17:30:05 »
Quote from: "Anik"
Failed. PHP returned a WSOD
ssh varnishstat: command not found

should i need to install varnishstat via yum?

Yes
« Last Edit: 1970-01-01, 01:00:00 by Guest »

 


MRatWork Affiliates:    BIGRAF(R) Inc.    House of LMAR    EFARgrafix

Page created in 0.031 seconds with 19 queries.

web stats analysis