php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9388 odbc_pconnect and hanging database connections
Submitted: 2001-02-21 17:23 UTC Modified: 2001-02-22 18:35 UTC
From: php at gustl dot net Assigned:
Status: Closed Package: ODBC related
PHP Version: 4.0.4 OS: Win98
Private report: No CVE-ID: None
 [2001-02-21 17:23 UTC] php at gustl dot net
When I open my Access Database with odbc_pconnect with NN4.7 on Apache 3.1.17, Netscape sends a "GET HTTP/1.1" request and a "Connection: Keep-Alive", but Apache answers with "Connection:close" (maybe he doesn't like keep alives with HTTP/1.0) and not with "Connection:timeout=15, max=100". 
With phpinfo I get "HTTP_CONNECTION=Keep-Alive", so php leaves a persistent connection open, but apache doesnt reuse it.
The result is an "out of disk space" after several calls. My workaround by now is to limit Apaches MaxRequestsPerChild, which results in a 3 second pause, when this limit is reached.

Gustav Graf

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-02-22 11:10 UTC] php at gustl dot net
When I open my Access Database with odbc_pconnect with NN4.7 on Apache 3.1.17, Netscape sends a "GET HTTP/1.0" request and a "Connection: Keep-Alive", but Apache answers with "Connection:close" (maybe he doesn't like keep alives with HTTP/1.0) and not with "Connection:timeout=15, max=100". 
With phpinfo I get "HTTP_CONNECTION=Keep-Alive", so php leaves a persistent connection open, but apache doesnt reuse it.
The result is an "out of disk space" after several calls. My workaround by now is to limit Apaches MaxRequestsPerChild, which results in a 3 second pause, when this limit is reached.

Gustav Graf

 [2001-02-22 11:42 UTC] kara@php.net
Apache will keep a pconnection open no matter if it's a
keep-alive HTTP connection or not.
If you are on windows, you could try to use the odbc
drivermanager connection pooling feature and use
odbc_connect() in your scripts.
 [2001-02-22 18:35 UTC] php at gustl dot net
ODBC Pooling gained no performance win, I switched to MSSQL-Server, good performance, no more open persistent connections.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 14:01:28 2024 UTC