time out
Monday, 16 April 2012 · 2 messages
CM
Cerstin Mahlow16 Apr 2012 14:24 #
Hi,
I have a Web interface (cgi-bin) that allows users to search a collection and store specific results. Although each user has to log in with a personal account, they all use the same interface and thus create a session with:
my $session = Session->new("localhost", 1984, "admin", "admin");
It is possible that several users access the collection at the same time and run different queries.
From time to time (I cannot see a specific pattern), they report a time-out. It is not because they try to cancel a query by clicking the back-button. If they try the same query a few minutes later, it runs without a time-out.
These queries need between 200 and 14000 ms in the GUI and have around 2000 to 4000 results.
I wonder whether this time-out is due to overload of the server as such (I have a virtual server only with 2GB RAM and don't know who else is using it for what) because it needs so much time to compute the results, or due to concurrent access to the collection all run with the "admin" user?
The result for a query is a HTML code with checkboxes, the rendering of each element is done within XQuery. Perhaps this makes the whole process too slow and the browser times out waiting for the results?
Best regards
Cerstin
--
Dr. phil. Cerstin Mahlow
Universität Basel
Departement Sprach- und Literaturwissenschaften
Fachbereich Deutsche Sprach- und Literaturwissenschaft
Nadelberg 4
4051 Basel
Schweiz
Tel: +41 61 267 07 65
Fax: +41 61 267 34 40
Mail: cerstin.mahlow at unibas.ch
Web: http://www.oldphras.net
---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.
CG
Christian Grün16 Apr 2012 22:17 #
Hi Cerstin,
Quoted text · Cerstin Mahlow · 4 lines
> It is possible that several users access the collection at the same time and > run different queries. > [...] > From time to time (I cannot see a specific pattern), they report a time-out.
Did you choose a timeout in BaseX? If no, what's the message you‘re getting from the server/browser? Did you try the latest version?..
http://files.basex.org/releases/latest/
Quoted text · Cerstin Mahlow · 3 lines
> The result for a query is a HTML code with checkboxes, the rendering of each > element is done within XQuery. Perhaps this makes the whole process too > slow and the browser times out waiting for the results?
I assume that most time is needed for retrieving the actual results. If you don't want to list all 2000-4000 hits, you may reduce them with a position filter, e.g. (...)[position() = 1 to 10].
Hope this helps,
Christian
Written for BaseX 7.2. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery