The persistent connection issue I had was under load.. php was not properly round robining.. The solution was just not to use it, to use the _connect function instead of _pconnect.
From: Byron Smith [mailto:byron@...]
Sent: Monday, February 04, 2013 9:07 PM
To: 'Demian Katz'; 'VuFind List'
Cc: 'Tony Di Giulio'
Subject: Re: [VuFind-General] Apache/PHP/MSSQL intermittent connection issues
Hi Demian & Stephen,
The default connection limit for SQL Server 2000 is 32,767 which I don't believe has been modified. This would be ok for our purposes. The fact I am noticing immediate 'improvement' when apache is restarted has me suspecting it is something related to php/apache. Often when the live holdings fail to return it seems to be very instantaneous like it is not even attempting to make the connection to mssql. I read the following article which seems to describe our scenario.
https://bugs.php.net/bug.php?id=29074
I have increased the value of mssql.max_procs and also copied the file ntwdblib.dll into the system32 folder. So far so good but it is very difficult to tell since it can seem ok for a few days then come back.
Stephen, we are using a persistent connection. I would be interested to hear what your experience with this was and if you came up with any work around?
Regards,
Byron
________________________________
From: Demian Katz [mailto:demian.katz@...]
Sent: Tuesday, 5 February 2013 12:32 AM
To: Byron Smith; 'VuFind List'
Cc: 'Tony Di Giulio'
Subject: RE: [VuFind-General] Apache/PHP/MSSQL intermittent connection issues
Does the database server have a connection limit? I'm not really familiar with MSSQL, but databases in general tend to have configurable limits on how many connections may exist at a given time (and commercial software may also have licensing restrictions with the same effect). Your description of the problem seems to correspond with an "out of connections" situation.
If you can raise the connection limit, that might help.
The other thing to look into is whether PHP is keeping database connections alive longer than it needs to. Normally, PHP should automatically drop all connections after a script finishes executing... but it might not hurt to add some explicit connection-close statements to your code if they are missing, and it would also be a good idea to check if there are any scripts that are running for long periods of time (you might be able to use the Apache mod_status tool to inspect what is going on).
Let me know if you need more details!
- Demian
From: Byron Smith [mailto:byron@...]
Sent: Sunday, February 03, 2013 9:30 PM
To: 'VuFind List'
Cc: 'Tony Di Giulio'
Subject: [VuFind-General] Apache/PHP/MSSQL intermittent connection issues
Hi All,
We are currently experiencing a very annoying intermittent connection issue with our LMS driver connecting to an external server running on a SQL Server 2000 database. The php/mssql connection itself works however after a period of time it progressively gets to a point where the LMS driver will intermittently fail to make a connection to the mssql database and as a result fail to display any of the live holding data from the LMS. Restarting apache seems to temporarily fix the situation however it seems like it is about 24 hours before the problem starts to reoccur again with the same intermittent connection issues. I am not certain but it also seems like the problem relates to periods of high volume usage for the library.
Does anybody have any ideas on what could cause this issue or anyway to troubleshoot where the problem could be?
The setup we have is:
Vufind Server
Windows 2008 R2 Server
PHP 5.2.17
Apache 2.2.19
LMS Server
Windows 2003 R2 Server
MSSQL 2000
Regards,
Byron
________________________________
The Buffalo & Erie County Public Library System has more than 2.6 million materials available for borrowing including books, eBooks, DVDs, music and more. Free library card applications can be downloaded and taken to any of the 37- local public libraries for processing. A valid form of identification and proof of address is necessary. For more information call 716-858-8900 or visit http://www.BuffaloLib.org .
|