After some testing, the problem comes from WorldCatUtils.php on the line
 $fp = @fopen($url, "r")
Somehow it just stuck in here and wait until timeout, i don't know why.
But i don't think it is kind of a "bug" because i am sure the code works fine in other machines / network.
I tried switch the code using Proxy_Request class and it works now.
I am not sure i should change this because i can see "file_get_contents" and "fopen" at some other place too.
I think i need some more investigation on this coz this issues had haunting me for a long time


On 4/26/2011 9:18 PM, Demian Katz wrote:

It’s possible that file_get_contents is to blame.  Really, for consistency with the rest of the code, it would be better if the OCLC functions used the Proxy_Request class (a child of the standard PEAR HTTP_Request) for data retrieval.  If you have time to switch the code over and would be willing to share a patch showing the fix, I’d be happy to include that in the trunk for future convenience.


- Demian


From: waynelam []
Sent: Tuesday, April 26, 2011 9:16 AM
To: Demian Katz
Cc: Eoghan Ó Carragáin;
Subject: Re: [VuFind-General] VuFind performance?


I followed Eoghan's method and tried comment it and it did the trick.
But the problem is i am not behind any proxy. The server is using true IP and behind firewall.
I 've tried accessing WorldCat directly using lynx. It doesn't seems so slow and response pretty fast.


I have experienced similar problem in some other case in using php function file_get_contents to 
access other webpages. Last time i fix this kind of issues is switching to cURL php functions.
Could this issue be a similar case?

On 4/26/2011 8:48 PM, Demian Katz wrote:

OCLC does seem like the most significant likely bottleneck… but if that doesn’t help, another thing to look at is the ILS driver.  Does it get faster if you switch your driver from “Innovative” to “Sample”?  (Obviously, that’s not a long-term fix – but if the Innovative driver is causing a slowdown, switching temporarily to the do-nothing Sample driver should prove the theory).


- Demian


From: Eoghan Ó Carragáin []
Sent: Tuesday, April 26, 2011 6:10 AM
To: waynelam
Subject: Re: [VuFind-General] VuFind performance?


I think this could be to do with your proxy settings. Line 148 ($editions = $this->recordDriver->getEditions();) in /web/services/Record/Record.php attempts to access OCLC/Worldcat to get other editions of the same book (via /web/RecordDrivers/IndexRecord.php and /web/sys/WorldCatUtils.php). Normally this is very quick, but if you are behind a proxy and it isn't configured under [Proxy] in config.ini, I've noticed that this can really slow down the record page, presumably because it is waiting on a timeout for the service. If you can't configure the proxy, try commenting out the following lines in /web/services/Record/Record.php as a test:
            // Find Other Editions
            //$editions = $this->recordDriver->getEditions();
            //if (!PEAR::isError($editions)) {
            //    $interface->assign('editions', $editions);
All the best,

On 26 April 2011 09:46, waynelam <> wrote:


I have recently freshly installed latest version of VuFind. I've imported
some of the records (around 1000 records). I experienced slow response
while accessing by opening record only but not searching. For instance,


I tried to access solr directly to the specific record (id=37046205), it
response fast without problem.
I suspect the slow may come from the plugins. I tried to disable
them by commenting out "OpenURL", "OAI", "Catalog", etc but still no luck.

Someone know how to track this? The log wouldn't show me anything.

my config.ini:

available       = true
debug           = true
path            = /vufind
url             =
local           = /var/www/vufind/web
email           =
title           = ""
theme           = default
mobile_theme    = mobile
language        = en    ; default -- more options available in
[Languages] below.
locale          = en_US
timezone        = "Asia/Hong_Kong"
defaultModule   = Search
defaultRecordTab= Holdings
type                        = MySQLSession
lifetime                    = 3600 ; Session lasts for 1 hour
file_save_path              = /tmp/vufind_sessions
driver          = Innovative
method          = ILS
enabled         = false
solr            = http://localhost:8080/solr
engine          = Solr
url             = http://localhost:8080/solr
local           = /var/www/vufind/solr
default_core    = biblio
host            =
port            = 25
database        = mysql://user:pass@localhost/catalog
schema_location = /var/www/vufind/web/conf
class_location  = /var/www/vufind/web/services/MyResearch/lib
require_prefix  =
class_prefix    =
debug           = 0

authors         = Wikipedia

enabled = true
limit   = 3
phrase = false
expand  = true
simple = false
skip_numeric = true
file           = /var/log/vufind/messages.log:alert,error,notice,debug
facets = facets.ini         ; settings affecting faceting in UI
searches = searches.ini     ; search definitions and preferences
en          = "English"
de          = "German"
es          = "Spanish"
fr          = "French"
it          = "Italian"
ja          = "Japanese"
nl          = "Dutch"
pt-br       = "Brazilian Portugese"
zh-cn       = "Simplified Chinese"
zh          = "Chinese"
tr          = "Turkish"
he          = "Hebrew"
ga          = "Irish"

result_limit    = 100
dewey           = false     ; allow browsing of Dewey Decimal call numbers
lcc             = true      ; allow browsing of LC call numbers

RefWorks = true
EndNote = false
MARC = true
RDF = true

multiple_call_nos = first
multiple_locations = msg

next_prev_navigation = false

WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today.  Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
VuFind-General mailing list


Wayne Lam
Assistant Library Officer I
Systems Development & Support
Fong Sum Wood Library
Lingnan University
8 Castle Peak Road
Tuen Mun, New Territories
Hong Kong SAR
Phone:   +852 26168585

Wayne Lam
Assistant Library Officer I
Systems Development & Support
Fong Sum Wood Library
Lingnan University
8 Castle Peak Road
Tuen Mun, New Territories
Hong Kong SAR
Phone:   +852 26168585