From owner-freebsd-apache@FreeBSD.ORG Sun Nov 28 15:43:53 2010 Return-Path: Delivered-To: apache@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 913B41065670; Sun, 28 Nov 2010 15:43:53 +0000 (UTC) (envelope-from root@s1.sdv.com.ua) Received: from s1.sdv.com.ua (s1.sdv.com.ua [77.120.97.61]) by mx1.freebsd.org (Postfix) with ESMTP id 51B938FC0A; Sun, 28 Nov 2010 15:43:53 +0000 (UTC) Received: from root by s1.sdv.com.ua with local (Exim 4.72 (FreeBSD)) (envelope-from ) id 1PMj5K-000NAk-5y; Sun, 28 Nov 2010 17:22:38 +0200 Date: Sun, 28 Nov 2010 17:22:38 +0200 Message-Id: To: FreeBSD-gnats-submit@freebsd.org From: Alex Samorukov X-send-pr-version: 3.113 X-GNATS-Notify: Cc: samm@os2.kiev.ua, apache@FreeBSD.org Subject: [PATCH] www/mod_log_mysql: [enable auto reconnect support] X-BeenThere: freebsd-apache@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Support of apache-related ports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Nov 2010 15:43:53 -0000 >Submitter-Id: current-users >Originator: Alex Samorukov >Organization: Net-Art >Confidential: no >Synopsis: [PATCH] www/mod_log_mysql: [enable auto reconnect support] >Severity: non-critical >Priority: low >Category: ports >Class: change-request >Release: FreeBSD 7.3-RELEASE-p1 i386 >Environment: System: FreeBSD s1.sdv.com.ua 7.3-RELEASE-p1 FreeBSD 7.3-RELEASE-p1 #6: Sun Sep 5 17:57:21 EEST >Description: I am using mod_log_mysql on a busy web server and found that sometime i am gettng messages like "server gone away". In worst case i am also getting core dump in mysql_real_escape(), probably because db object is not valid anymore. After debugging I found that root reason is disconnect timeout - when child is not active for a long time server closing connection. This small patch enable auto-reconnect support, so in this case conection is re-established automatically. I tested it ~4 days and found that messages are gone and no more core dumps in the logs. Changed files: - Makefile - distinfo New file: - files/patch-mod_log_mysql.c Port maintainer (apache@FreeBSD.org) is cc'd. Generated with FreeBSD Port Tools 0.99 >How-To-Repeat: >Fix: --- ap20-mod_log_mysql-1.0_1.patch begins here --- diff -ruN --exclude=CVS /usr/ports/www/mod_log_mysql/Makefile /root/tmp/mod_log_mysql/Makefile --- /usr/ports/www/mod_log_mysql/Makefile 2009-05-17 10:24:32.000000000 +0300 +++ /root/tmp/mod_log_mysql/Makefile 2010-11-28 17:06:57.000000000 +0200 @@ -7,6 +7,7 @@ PORTNAME= mod_log_mysql PORTVERSION= 1.0 +PORTREVISION= 1 CATEGORIES= www # Original location: http://bitbrook.de/software/mod_log_mysql/mod_log_mysql.c MASTER_SITES= http://sheepkiller.nerim.net/ports/${PORTNAME}/ @@ -17,7 +18,7 @@ RUN_DEPENDS+= ${LOCALBASE}/${APACHEMODDIR}/mod_log_config-st.so:${PORTSDIR}/www/mod_log_config-st -MAKE_JOBS_SAFE= yes +MAKE_JOBS_SAFE= yes USE_APACHE= 20+ AP_FAST_BUILD= YES diff -ruN --exclude=CVS /usr/ports/www/mod_log_mysql/distinfo /root/tmp/mod_log_mysql/distinfo --- /usr/ports/www/mod_log_mysql/distinfo 2006-02-02 00:12:20.000000000 +0200 +++ /root/tmp/mod_log_mysql/distinfo 2010-11-28 17:04:42.000000000 +0200 @@ -1,3 +1,2 @@ -MD5 (apache2/mod_log_mysql-1.0.tar.gz) = bdde1ff13749437e2650fb4d376e2e5a SHA256 (apache2/mod_log_mysql-1.0.tar.gz) = 27fdd2c87133d62171a38585807f70009821a3cb13e011d2ceb62fcc1c8ad4bb SIZE (apache2/mod_log_mysql-1.0.tar.gz) = 8046 diff -ruN --exclude=CVS /usr/ports/www/mod_log_mysql/files/patch-mod_log_mysql.c /root/tmp/mod_log_mysql/files/patch-mod_log_mysql.c --- /usr/ports/www/mod_log_mysql/files/patch-mod_log_mysql.c 1970-01-01 03:00:00.000000000 +0300 +++ /root/tmp/mod_log_mysql/files/patch-mod_log_mysql.c 2010-11-28 17:01:37.000000000 +0200 @@ -0,0 +1,16 @@ +--- mod_log_mysql.c 2003-11-01 12:21:28.000000000 +0200 ++++ mod_log_mysql.c.new 2010-11-28 17:01:06.000000000 +0200 +@@ -172,11 +172,13 @@ + { + mysql_log *l = param; + MYSQL *db; ++ my_bool do_reconnect = 1; + + db = apr_palloc(p, sizeof(MYSQL)); + + mysql_init(db); + mysql_options(db, MYSQL_READ_DEFAULT_GROUP, "mod_log_mysql"); ++ mysql_options(db, MYSQL_OPT_RECONNECT,&do_reconnect); + + if (! mysql_real_connect(db, l->host, l->user, l->passwd, l->database, l->port, l->socket, 0)) { + ap_log_perror(APLOG_MARK, APLOG_CRIT, 0, p, "log database %s: %s", l->uri, mysql_error(db)); --- ap20-mod_log_mysql-1.0_1.patch ends here --- From owner-freebsd-apache@FreeBSD.ORG Sun Nov 28 15:50:17 2010 Return-Path: Delivered-To: apache@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2DD431065696; Sun, 28 Nov 2010 15:50:17 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 0381A8FC08; Sun, 28 Nov 2010 15:50:17 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id oASFoGef012657; Sun, 28 Nov 2010 15:50:16 GMT (envelope-from edwin@freefall.freebsd.org) Received: (from edwin@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id oASFoGuF012653; Sun, 28 Nov 2010 15:50:16 GMT (envelope-from edwin) Date: Sun, 28 Nov 2010 15:50:16 GMT Message-Id: <201011281550.oASFoGuF012653@freefall.freebsd.org> To: edwin@FreeBSD.org, freebsd-ports-bugs@FreeBSD.org, apache@FreeBSD.org From: edwin@FreeBSD.org Cc: Subject: Re: ports/152644: [PATCH] www/mod_log_mysql: [enable auto reconnect support] X-BeenThere: freebsd-apache@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Support of apache-related ports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Nov 2010 15:50:17 -0000 Synopsis: [PATCH] www/mod_log_mysql: [enable auto reconnect support] Responsible-Changed-From-To: freebsd-ports-bugs->apache Responsible-Changed-By: edwin Responsible-Changed-When: Sun Nov 28 15:50:16 UTC 2010 Responsible-Changed-Why: Over to maintainer (via the GNATS Auto Assign Tool) http://www.freebsd.org/cgi/query-pr.cgi?pr=152644 From owner-freebsd-apache@FreeBSD.ORG Mon Nov 29 11:06:15 2010 Return-Path: Delivered-To: apache@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85CF91065697 for ; Mon, 29 Nov 2010 11:06:15 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 7368C8FC1A for ; Mon, 29 Nov 2010 11:06:15 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id oATB6F0j052454 for ; Mon, 29 Nov 2010 11:06:15 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id oATB6EgT052452 for apache@FreeBSD.org; Mon, 29 Nov 2010 11:06:14 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 29 Nov 2010 11:06:14 GMT Message-Id: <201011291106.oATB6EgT052452@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: apache@FreeBSD.org Cc: Subject: Current problem reports assigned to apache@FreeBSD.org X-BeenThere: freebsd-apache@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Support of apache-related ports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Nov 2010 11:06:15 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o ports/152644 apache [PATCH] www/mod_log_mysql: [enable auto reconnect supp o ports/147806 apache [PATCH] www/apache20: httpd doesn't start with WITH_LD o ports/147282 apache errors when starting www/apache22 after installation o o ports/146199 apache www/apache20: port does not use make config o ports/144010 apache devel/apr1 tries to use SYSVIPC even in jails o ports/130479 apache www/apache20 and www/apache22 configure_args busted o ports/125183 apache www/apache22 wrong SUEXEC_DOCROOT o ports/124375 apache security/heimdal: www/mod_auth_kerb doesn't compile ag p ports/116984 apache [patch] www/apache13-modssl missing perl5.8 as RUN_DEP s ports/108169 apache www/apache20 wrong AP_SAFE_PATH for suEXEC 10 problems total. From owner-freebsd-apache@FreeBSD.ORG Tue Nov 30 21:57:57 2010 Return-Path: Delivered-To: apache@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08A6A1065670 for ; Tue, 30 Nov 2010 21:57:57 +0000 (UTC) (envelope-from root@host1.auctionblockz.com) Received: from host1.auctionblockz.com (75-143-255-90.dhcp.gnvl.sc.charter.com [75.143.255.90]) by mx1.freebsd.org (Postfix) with ESMTP id BA3008FC0A for ; Tue, 30 Nov 2010 21:57:56 +0000 (UTC) Received: from host1.auctionblockz.com (localhost [127.0.0.1]) by host1.auctionblockz.com (8.14.4/8.14.4) with ESMTP id oAULb0lf058881 for ; Tue, 30 Nov 2010 16:37:00 -0500 (EST) (envelope-from root@host1.auctionblockz.com) Received: (from root@localhost) by host1.auctionblockz.com (8.14.4/8.14.4/Submit) id oAULb0J4058880 for apache@freebsd.org; Tue, 30 Nov 2010 16:37:00 -0500 (EST) (envelope-from root) Date: Tue, 30 Nov 2010 16:37:00 -0500 (EST) From: Charlie Root Message-Id: <201011302137.oAULb0J4058880@host1.auctionblockz.com> To: apache@freebsd.org Cc: Subject: error X-BeenThere: freebsd-apache@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Support of apache-related ports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Nov 2010 21:57:57 -0000 ===> apache-2.0.64 depends on file: /usr/local/bin/perl5.10.1 - found ===> apache-2.0.64 depends on file: /usr/local/bin/autoconf-2.68 - found ===> apache-2.0.64 depends on package: libtool>=2.2 - found ===> apache-2.0.64 depends on shared library: expat.6 - found ===> apache-2.0.64 depends on shared library: pcre.0 - found ===> apache-2.0.64 depends on shared library: apr-0 - found ===> apache-2.0.64 depends on shared library: iconv.3 - found ===> Configuring for apache-2.0.64 checking for chosen layout... FreeBSD checking for working mkdir -p... yes checking build system type... amd64-portbld-freebsd8.1 checking host system type... amd64-portbld-freebsd8.1 checking target system type... amd64-portbld-freebsd8.1 Configuring Apache Portable Runtime library ... checking for APR... yes adding "-g" to CFLAGS adding "-pthread" to CFLAGS setting CPPFLAGS to " -D_REENTRANT -D_THREAD_SAFE" setting INCLUDES to " -I/usr/local/include/apr-0 " Configuring Apache Portable Runtime Utility library... checking for APR-util... yes adding "-L/usr/local/lib" to LDFLAGS adding "-L/usr/local/lib/db42" to LDFLAGS adding "-I/usr/local/include" to INCLUDES adding "-I/usr/local/include/db42" to INCLUDES checking for gcc... cc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether cc accepts -g... yes checking for cc option to accept ISO C89... none needed checking how to run the C preprocessor... cpp Configuring PCRE regular expression library ... configuring package in srclib/pcre now configure failed for srclib/pcre ===> Script "configure" failed unexpectedly. Please report the problem to apache@FreeBSD.org [maintainer] and attach the "/usr/ports/www/apache20/work/httpd-2.0.64/config.log" including the output of the failure of your make command. Also, it might be a good idea to provide an overview of all packages installed on your system (e.g. an `ls /var/db/pkg`). *** Error code 1 Stop in /usr/ports/www/apache20. From owner-freebsd-apache@FreeBSD.ORG Wed Dec 1 15:50:45 2010 Return-Path: Delivered-To: apache@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 888D4106566C; Wed, 1 Dec 2010 15:50:45 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 5E6408FC1A; Wed, 1 Dec 2010 15:50:45 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id oB1FojQg016016; Wed, 1 Dec 2010 15:50:45 GMT (envelope-from edwin@freefall.freebsd.org) Received: (from edwin@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id oB1FojIh016006; Wed, 1 Dec 2010 15:50:45 GMT (envelope-from edwin) Date: Wed, 1 Dec 2010 15:50:45 GMT Message-Id: <201012011550.oB1FojIh016006@freefall.freebsd.org> To: edwin@FreeBSD.org, freebsd-ports-bugs@FreeBSD.org, apache@FreeBSD.org From: edwin@FreeBSD.org Cc: Subject: Re: ports/152746: [maintainer update] Update www/mod_tsa makefile for using AP_FAST_BUILD X-BeenThere: freebsd-apache@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Support of apache-related ports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Dec 2010 15:50:45 -0000 Synopsis: [maintainer update] Update www/mod_tsa makefile for using AP_FAST_BUILD Responsible-Changed-From-To: freebsd-ports-bugs->apache Responsible-Changed-By: edwin Responsible-Changed-When: Wed Dec 1 15:50:44 UTC 2010 Responsible-Changed-Why: apache@ wants this port PRs (via the GNATS Auto Assign Tool) http://www.freebsd.org/cgi/query-pr.cgi?pr=152746 From owner-freebsd-apache@FreeBSD.ORG Thu Dec 2 18:29:24 2010 Return-Path: Delivered-To: apache@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 875CD1065696 for ; Thu, 2 Dec 2010 18:29:24 +0000 (UTC) (envelope-from christian@eloinet.com.br) Received: from sv-em-cp-01-01.eloinet.com.br (sv-em-cp-01-01.eloinet.com.br [187.45.32.2]) by mx1.freebsd.org (Postfix) with ESMTP id CBA098FC24 for ; Thu, 2 Dec 2010 18:29:22 +0000 (UTC) Received: (qmail 83479 invoked from network); 2 Dec 2010 16:02:49 -0200 Received: from 187-45-36-254.customer.eloinet.com.br (HELO ?10.20.4.3?) (christian@admin.eloinet.com.br@187.45.36.254) by sv-em-cp-01-01.eloinet.com.br with SMTP; 2 Dec 2010 16:02:49 -0200 From: Christian Sant'Ana To: apache@freebsd.org Content-Type: multipart/mixed; boundary="=-OdXNPx+rgE7bjPHqVvbw" Date: Thu, 02 Dec 2010 16:02:39 -0200 Message-ID: <1291312959.11402.3.camel@Christian-PC> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Ports Problem X-BeenThere: freebsd-apache@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Support of apache-related ports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Dec 2010 18:29:24 -0000 --=-OdXNPx+rgE7bjPHqVvbw Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit checking for cc option to accept ISO C89... none needed checking how to run the C preprocessor... cpp Configuring PCRE regular expression library ... configuring package in srclib/pcre now /usr/ports/www/apache20/work/httpd-2.0.64/srclib/pcre/configure: Can't open /usr/ports/www/apache20/work/httpd-2.0.64/srclib/pcre/configure: No such file or directory configure failed for srclib/pcre ===> Script "configure" failed unexpectedly. Please report the problem to apache@FreeBSD.org [maintainer] and attach the "/usr/ports/www/apache20/work/httpd-2.0.64/config.log" including the output of the failure of your make command. Also, it might be a good idea to provide an overview of all packages installed on your system (e.g. an `ls /var/db/pkg`). *** Error code 1 Stop in /usr/ports/www/apache20. *** Error code 1 --=-OdXNPx+rgE7bjPHqVvbw--