craftcms / craftcms/cms

Browser hangs while Assets are loading

Open
#2,547 27 comments 0 reactions 1 assignee View on GitHub

@andris-sevcenko is already working on this.

Since Mar 7, 2018.

bug severity:normal
Dominant language
PHP
Stars
3.6k
Forks
705
Avg merge
1d 5h
Merged PRs (30d)
134

Description

Description

Yesterday I uploaded upwards of 1GB of images to an S3 bucket, spanning 17 subdirectories. I then indexed them in Craft. That all went fine.

When I navigate to Assets in the CP and click on some of the subdirectory names, some have thumbnails cached on the web server and load quickly. Others do not, and when I click into those, the spinner fires up.

At this point I'm just waiting, and I can't navigate anywhere else using the current browser. Clicking on another subfolder name doesn't do anything, nor does clicking on another link in the CP. It's just spinning in the current subfolder view. If I open a new tab in the same browser and try to visit /admin, that doesn't respond either. There's no error—it just spins.

This is a localhost server on MAMP Pro, and I assumed the server was just busy generating all those images. BUT if I open another browser—say Chrome's spinning and I switch to Safari—I can get right into the CP; the server is responsive. Once I try visiting those subfolders without thumbnails there, though, the same thing happens. I get stuck in one without thumbnails.

For the sake of it, I then switched to Firefox. Same thing: I can get right in to the CP while the other two browsers are hung.

At one point I did see a "Waiting for socket" status in Chrome when trying to hit the CP again in a new tab.

There seems to be the underlying performance issue in the browser, but also the fact that a "normal" admin user is going to be lost in this scenario. The site's still responding—to other users or browsers—but without switching browsers, they can't get back into the CP.

Steps to reproduce
  1. Index a large number of new files across subdirectories.
  2. Try visiting one of those folders in the CP under Assets, where thumbnails have not yet been generated.
Additional info
  • Craft version: 3.0.0-RC13
  • PHP version: 7.1.12
  • Database driver & version: MySQL 5.6.38
  • Plugins & versions: Amazon S3 1.0.8, CKEditor 1.0.0-beta.2, Postmark 1.0.0-rc1.1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.