Issue Number | 315 |
---|---|
Summary | Internal Server Error |
Created | 2015-08-25 11:29:19 |
Issue Type | Bug |
Submitted By | Shields, Victoria (NIH/NCI) [E] |
Assigned To | |
Status | Closed |
Resolved | 2019-08-28 09:35:10 |
Resolution | Cannot Reproduce |
Path | /home/bkline/backups/jira/oceebms/issue.168441 |
On Monday, Aug 24, I got an internal server error several times while working in the EBMS on PROD. The error appeared when I was trying to download the full text of a citation, when I clicked on the REPORTS menu, when I clicked on items in the ADMIN menu, when I tried to access the full citation information for a citation, and other times as well. Each time, if I used my back button and tried the link again, it worked. Later in the day, I did not get the error at all. I will try to attach a screen shot.
There are some errors recorded in the Drupal error logs at 1:39, 3:48, 4:02 and 4:05. I don't know if these are the errors you (Victoria) encountered, but there is some information there that will help find problems.
I've also asked CBIIT to post copies of the web server and php error logs (WEBTEAM-6964). These may give us additional information.
I'll be going away for three weeks starting tomorrow. I don't know what I'll find before then, and there are other things I have to work on before I leave, but I will try to post something tonight about whatever I've learned.
I've added Bob as a watcher on this and the webteam issue though he'll be on vacation next week. But, hopefully, this problem is not stopping work. If it looks like it will, start shouting 🙂
Thank you, Alan! Definitely not stopping any work. i just wanted to report it because I never know if these kinds of errors are harmless or the sign of an apocalypse.
I think it was a bug, and I may have found it. In fact, there may be two of them.
I'll record what I found here in case we don't get to fix it right away and, with my precarious memory, I forget what I found.
The file /modules/custom/ebms/review.inc Includes this code in the validation routine named "pdq_ebms_edit_packet_form_validate()"
= $form_state['values']['articles'];
$articles foreach ($articles as $id => $val)
if ($val) // BUG - What if no articles?
++;
$article_count= $form_state['values']['reviewers'];
$reviewers foreach ($reviewers as $id => $val)
if ($val) // BUG - What if no reviewers?
++; $reviewer_count
I think the two lines marked with my comment "BUG - What if no ..." are where the errors are coming from. We need to test to be sure that there actually are articles or reviewers before executing the code marked BUG.
If this is right, the problem occurs when trying to get more information about a zero length list of articles or a zero length list of reviewers.
I'll set the status of this to "In Progress", but not do any more until we figure out when and how to make another EBMS release.
Also for the record, the key that found the problem was in the watchdog log with a number of lines similar to what follows:
1440447567 |
php |
%type: !message in %function (line %line of %file). |
a:6:{s:5:"%type";s:7:"Warning";s:8:"!message";s:39:"Invalid argument supplied for foreach()";s:9:"%function";s:36:"pdq_ebms_edit_packet_form_validate()";s:5:"%file";s:79:"/local/content/web/appdev/sites/ebms.nci.nih.gov/modules/custom/ebms/review.inc";s:5:"%line";i:4489;s:14:"severity_level";i:4;} |
I've got a copy of the log errors if ever need them in:
"/h1/alan/ebms/WatchdogLogForOCEEBMS-315.txt"
Maybe I was too fast here. The errors I found are real and ought to be fixed, but they appear a lot of times in the log. It seems surprising for them not to be reported before this. So it's possible that there is something else involved.
I have attached "WatchdogLogForOCEEBMS-315.txt" with the text of the log file as referenced in my comment of Tuesday, 25 Aug 2015 02:56 PM.
Siphoning off the bugs Alan found (which are not likely to be the cause of the failures Victoria encountered) to OCEEBMS-355. We won't do any further work on this original ticket (nor will we provide an LOE) unless the problems happen again. If this was not a transient problem, please note the times of the failures as closely as you can.
Should we close this ticket?
Closing ticket. Re-open if that's not right.
File Name | Posted | User |
---|---|---|
internal server error.doc | 2015-08-25 11:36:07 | Shields, Victoria (NIH/NCI) [E] |
WatchdogLogForOCEEBMS-315.txt | 2015-12-31 16:12:08 |
Elapsed: 0:00:00.000477