Skip to Content.
Sympa Menu

freetds - RE: [freetds] Strange error -- side effect of persistent connections or FreeTDS problem?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddyz77 AT tin.it>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] Strange error -- side effect of persistent connections or FreeTDS problem?
  • Date: Sun, 27 Feb 2005 11:29:50 +0100

Il giorno sab, 26-02-2005 alle 14:13 -0600, Michael Sims ha scritto:
> Michael Sims wrote:
> > 0.63RC10 yeserday and I also implemented persistent connections in
> > PHP/Apache using PHP's mssql_pconnect(). Late last night I started
> > getting a new (to me) error message when calling mssql_select_db():
> >
> > Sybase: Client message: Attempt to initiate a new SQL Server
> > operation with results pending. (severity 78)
>
> Yesterday I also got a couple of "Sybase: Client message: Write to SQL
> Server failed. (severity 78)" messages. Then I installed yesterday's
> development snapshot (freetds-0.64.dev.20050225) and now it seems to be
> doing just fine. I've gone for about 18 hours or so without any problems.
> Is it possible that something has changed that makes the latest development
> play nicer with PHP's persistent connection mechanism? Or maybe this is
> just a coincidence...
>

Mmmm... this can be related to cancel. Perhaps PHP do a cancel when
connection goes into internal pool so it can be that cancel fails... I
don't think this fix will be backported to 0.63 cause is too intrusive.

> Another question...my understanding is that with mod_php and persistent
> connections a single connection is opened once for the lifetime of each
> apache process. This means that on a busy server if none of the apache
> children are being shut down a single process could run for quite a while.
> Does anyone have any advice on whether or not I should set Apache's
> MaxRequestsPerChild to a non-zero value? I know this isn't a PHP or Apache
> list, but I'm more concerned about it from a FreeTDS perspective (memory
> leaks, etc.). Has anyone reading this ever used persistent connections with
> PHP + FreeTDS and if so did you set the MaxRequestsPerChild value?
>

Well.. I don't think that 0.64 it's ready for production (as you can see
from recent changes there has been some memory problems...). I would
suggest to use MaxRequestPerChild (and even a timeout if is present)
simply cause doing so you can always keep your server in a stable state.
For example I don't know it php rollback current transaction putting
connection in pool or if it free temporary tables...

freddy77





Archive powered by MHonArc 2.6.24.

Top of Page