Project

General

Profile

Actions

Bug #1716

closed

Web pages take too long to when executing commands through ssh

Added by Amber Herold over 12 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
High
Assignee:
Amber Herold
Category:
Web interface
Target version:
Start date:
04/13/2012
Due date:
% Done:

0%

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

Description

There was a sleep statement that was put there at some point because everything was failing without it. I've redone this code so that it will only sleep for 1 second and if we are waiting for a result from the ssh stream, we return as soon as a result arrives. I'm not sure if that 1 second wait is actually needed. I've made commands for mkdir return from the function without waiting for results as results will never come.

This has made everything much faster, but requires carefull testing of everything...let me know if anything seems wrong.

Actions #1

Updated by Amber Herold over 12 years ago

  • Status changed from Assigned to In Code Review
  • Assignee changed from Amber Herold to Anchi Cheng
Actions #2

Updated by Anchi Cheng over 12 years ago

  • Status changed from In Code Review to In Test
  • Assignee changed from Anchi Cheng to Amber Herold

Code looks good.

I tested testimage and committed run for DogPicker. It still takes a little time before change to the page for feedback in the former (expected, since it has to run), and a little time for committed run. Maybe it is my sandbox? Nothing appears wrong, though. I also logged in as an unknown user for ssh, that worked fine and tried it on garibaldi which is not set up to run and got "job didn't run" error so that part works, too.

If you have a good way of testing other paths, I will do it.

Actions #3

Updated by Amber Herold over 12 years ago

  • Status changed from In Test to In Code Review
  • Assignee changed from Amber Herold to Anchi Cheng

Anchi, I added another tidbit to this. I want to know if the mkdir failed, otherwise it is difficult to understand why a command failed to execute. One thing, Christopher really wanted us to move the directory creation to the python side rather than the web server, so maybe this should be going away anyway, but in the meantime, a check is nice to have. Since it could be possible for the webserver to not have access to the processing server file system for the php fileExists() call, I just create a warning and prepend it to any errors that may come up, rather than reporting it as an error right away.

What do you think about this?

Actions #4

Updated by Anchi Cheng over 12 years ago

Code looks good. I am not sure that even with refinement job it could be run through the webserver if it does not have access to the preocessing server file system. It needs to transfer files, doesn't it?

Just a note that I started a wiki page on
Job_submission_vs_direct_Appion_Script_running_from_terminal Feel free to add on the job submission flow there, too. Hopefully it will be more clear why we create the directory from webserver on processing server in the first place.

Actions #5

Updated by Anchi Cheng over 12 years ago

  • Assignee changed from Anchi Cheng to Amber Herold

see question in previous update

Actions #6

Updated by Amber Herold over 10 years ago

  • Status changed from In Code Review to Closed
  • Affected Version changed from Appion/Leginon 2.2.0 (trunk) to Appion/Leginon 2.2.0
Actions

Also available in: Atom PDF