Project

General

Profile

Actions

Bug #1220

closed

loi.php generates a lot of query connection and seem to cause a traffic jam

Added by Anchi Cheng almost 14 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
Web Image Viewer
Start date:
03/04/2011
Due date:
% Done:

0%

Estimated time:
Affected Version:
Appion/Leginon 2.1.0
Show in known bugs:
No
Workaround:

Description

This was observed during the two very long sessions (> 3 days) in the past two weeks (11feb28a and 11feb24d). It accumulated many ten thousand "connection waiting to be close" between webserver and database server while trying to refresh 6 image viewer instances in loi.php, plus the queue processing time estimate. It was clear that the refreshes were not completed before the next refresh is initiated by java script, which might be why there were so many opened connection port.

The result of it was that many of the queries did not return correctly so that many showed as broken query. Appion users found that they are logged out by the system quickly after they logged in.

We will need a more permanent solution to this in the future and should be taken into account if we are planing new generation of image viewers. The work around now is not to use loi.php during these kinds of sessions.


Related issues 1 (0 open1 closed)

Related to Appion - Bug #6494: dddriftstatsgraph.php shows different results on reloadClosed01/02/2019

Actions
Actions #1

Updated by Anchi Cheng about 12 years ago

  • Assignee changed from Eric Hou to Anchi Cheng
  • Priority changed from Low to High

My reply to Bridget's email:

It is caused by lost of database connection from the webserver.  There were a lot of viewer opened, especially LOI.
We will need to experiment with applying Craig's fix at NIS here.  It was a curious fix, just not to close connection to
database after single query but still keeping many other connection close commands in for cases such as multiple query.
Somehow it did fixed the problem there.  I applied it to my sandbox here, but it didn't help.  In addition, Craig said that
the number of connection to database did not increase near to the limit when it happened there.

An issue was created 1 year ago http://emg.nysbc.org/issues/1220

Anchi

On Oct 11, 2012, at 9:46 PM, Bridget Carragher wrote:

HI Leginon/Appion team,
I notice that we get a lot of errors along the lines of:
"Warning: mysql_fetch_row() expects parameter 1 to be resource, boolean given in /srv/www/httpd" 
when trying to access the Leginon viewer - maybe especially in 3-view mode?  This replaces the image you expect to see with the error above and I noted in the cubicle today that it sometimes also means the user has to log in again (I have never had this problem).  It seems possible that this is caused by a lot of people accessing the viewer (or database) at the same time.  Anyone have any ideas on how to alleviate this issue?
Brudget

Actions #2

Updated by Anchi Cheng about 12 years ago

r17206 does not close connection in single query. This solution is from Craig but seems not having effect with applying just on my sandbox at NRAMM without it being used everywhere. Therefore, I commit it to see if it would work now that all updated myamiweb will use it.

Actions #3

Updated by Anchi Cheng about 12 years ago

Found that Craig's version is a little different. Commit that in r17309

Actions #4

Updated by Sargis Dallakyan almost 7 years ago

  • Status changed from Assigned to Closed
Actions #5

Updated by Sargis Dallakyan almost 6 years ago

  • Related to Bug #6494: dddriftstatsgraph.php shows different results on reload added
Actions

Also available in: Atom PDF