vtiger Forum Index vtiger
The Honest Open Source CRM
 

Persistent Connections
Click here to go to the original topic

 
       vtiger Forum Index -> Developer Forum - 4.x
Previous topic :: Next topic  
Author Message
walkabout



Joined: 15 Nov 2005
Posts: 6

Posted: Thu Dec 08, 2005 1:35 am    Post subject: Persistent Connections  

In PearDatabase.php the connect() function always uses PConnect ... giving persistent connections. Our database connections list was getting pretty big and that was then causing us some issues in weird places with other programs that use the database. I've just changed the call to "Connect" and that solves it. I think it should be referencing the setting for persistent connections in config though ...
Back to top  
mikecrowe



Joined: 04 Jan 2005
Posts: 499

Posted: Sat Dec 17, 2005 1:34 am    Post subject: Persistent Connections  

walkabout,

Funny you should mention this. I've been exploring development environments and ran across the same thing. PearDatabase.php completely ignores the settings in config.php and I don't know why.

Richie, any ideas why?
Back to top  
indigoleopard



Joined: 21 Aug 2004
Posts: 2111
Location: india,chennai

Posted: Sat Dec 17, 2005 12:25 pm    Post subject: Re: Persistent Connections  

Well, the code was written that way as php did not specify/provide for any persistence mechanism.
Moreover, getting a db connection has its own overhead. So, we decided to use pconnect.

But, I agree, that it too has limitations in the sense that it might hold up all the other connections once the limit is reached for the specific driver.

One can use the variable ADODB_NEVER_PERSIST just before the pconnect mechanism so that it will force using of the normal connect mechanism.

That should suffice.

We will make it variable in the next release wherein default behaviour will be to use persistent connection.

Richie
Back to top  
mikecrowe



Joined: 04 Jan 2005
Posts: 499

Posted: Sat Dec 17, 2005 2:33 pm    Post subject: Re: Persistent Connections  

What confuses me is there are a couple of things in config.php that were put there to control this state.

Please insure we obey the: Code: $dbconfigoption['persistent'] = true;

and that will give the flexibility we need.
Back to top  
 
       vtiger Forum Index -> Developer Forum - 4.x
Page 1 of 1


Powered by phpBB Search Engine Indexer
Powered by phpBB 2.0.15 © 2001, 2002 phpBB Group