php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9185 postgresql backend process become stale after php page loads
Submitted: 2001-02-09 02:26 UTC Modified: 2001-12-26 07:01 UTC
From: tom at minnesota dot com Assigned:
Status: Closed Package: PostgreSQL related
PHP Version: 4.0.4pl1 OS: NetBSD/Alpha 1.5.1-current
Private report: No CVE-ID: None
 [2001-02-09 02:26 UTC] tom at minnesota dot com
with persistent connection on, i notice that with a web page load, it starts a new postgresql backend and detaches from it. therefore, the postgresql backend becomes stale and just hangs there for hours and days.

upon reloading the page, a new pgsql backend starts. within a minute, all the pgsql connection is maxed out, because all the processes become stale and were never released. this is from just me pressing reload 15 or so times. no one else have access to this server.

if i do 'apachectl stop' then 'apachectl start' again, the stale pgsql processes do get freed up. i didn't compile pgql with php as a loadable module. though it's using pgsql's dynamic library:

./configure \
--with-apxs \
--with-sablot=/usr/local/install/Sablot-0.44 \
--with-mnogosearch=/usr/local \
--with-pgsql=/usr/local \
--with-mysql=/usr/local \
--enable-libgcc \
--with-gnu-ld \
--with-zlib \
--with-system-regex \
--with-config-file-path=/usr/local/etc \
--enable-track-vars \
--enable-force-cgi-redirect \
--enable-discard-path \
--enable-memory-limit \
--enable-sysvsem \
--enable-sysvshm \
--enable-sockets \
--with-gd=/usr/pkg \
--with-ttf=/usr/pkg \
--enable-freetype-4bit-antialias-hack

# ldd /usr/pkg/lib/httpd/libphp4.so
/usr/pkg/lib/httpd/libphp4.so:
         -lz.0 => /usr/lib/libz.so.0
         -lxmltok => /usr/local/install/Sablot-0.44/lib/libxmltok.so
         -lxmlparse => /usr/local/install/Sablot-0.44/lib/libxmlparse.so
         -lsablot => /usr/local/install/Sablot-0.44/lib/libsablot.so
         -lcrypt.0 => /usr/lib/libcrypt.so.0
         -lpq.2 => /usr/local/lib/libpq.so.2
         -lmysqlclient => /usr/local/lib/mysql/libmysqlclient.so
         -ludmsearch => /usr/local/lib/libudmsearch.so
         -lm.0 => /usr/lib/libm.so.0
         -lc.12 => /usr/lib/libc.so.12
         -lintl.1 => /usr/pkg/lib/libintl.so.1
         -lttf.4 => /usr/pkg/lib/libttf.so.4
         -lpng.1 => /usr/pkg/lib/libpng.so.1
         -ljpeg.62 => /usr/pkg/lib/libjpeg.so.62
         -lXpm.4 => /usr/X11R6/lib/libXpm.so.4
         -lX11.6 => /usr/X11R6/lib/libX11.so.6
         -lgd.1 => /usr/pkg/lib/libgd.so.1
         -lresolv.1 => /usr/lib/libresolv.so.1

also note that the regular pgsql clients do release the backend postmaster right away after it quits.

there is a bug related to this one which showed similar symptoms: bug id# 8769

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-02-15 21:33 UTC] tom at minnesota dot com
note that 'apachectl graceful' will get rid of the stale processes.
 [2001-12-05 18:34 UTC] yohgaki@php.net
Does this happen with 4.1.0RC5?
http://www.php.net/~zeev/php-4.1.0RC5.tar.gz


 [2001-12-05 19:09 UTC] yohgaki@php.net
Status => Feedback
 [2001-12-26 07:01 UTC] lobbin@php.net
No feedback. Closed.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 11:01:27 2024 UTC