"Failed to get available update data" in Drupal 7.94
jlswanson28694 opened this issue · comments
I'm attempting to view available updates on a fresh version of the Drupal 7 Docker image, and it keeps timing out. Visiting /admin/reports/updates
will load for quite some time before showing the "Available updates" page. Once on this page, the "drupal 7.94" module is labeled as "Failed to get available update data." Clicking "Check manually" results in similar behavior. The progress bar will be stuck for quite some time before returning to the "Available updates" page with the error "Failed to get available update data for one project."
After some investigation, it appears that the problem has to do with the drupal_http_request
function in the includes/common.inc
file. After making an http request to updates.drupal.org
, the function attempts to read the response. When running fread
on line 995, the loop continues to read the response from updates.drupal.org
successfully, until it reaches the end-of-file, where it freezes and times out. The array result of stream_get_meta_data
on line 997 has a eof
value of false
and a timed_out
value of true
.
When running this exact same code on my actual operating system outside the Docker container, this error doesn't occur. The result of stream_get_meta_data
returns a eof
value of true
, and the code doesn't stall or time out. The end-of-file issue seems to only occur inside of Docker containers. The same issue also occurred in other Docker containers I made that run Drupal 7 on Ubuntu and CentOS.
So, even though this issue is not specific to your particular Docker container, I was hoping you could help me figure out why this is happening.
Sorry for the delay 😅
I'm afraid I don't actually have any idea why that's happening, but it sounds like really bizarre behavior! I'd normally think something like that is network or host environment related, but I'm not sure what would cause it to return the data from the upstream server completely successfully and then simply freeze/hangup.