Forum

Thread tagged as: Problem

Assets Hanging

I'm running into an issue where the assets either won't load and produces an internal server error, or loads but takes a very long time. There are alot of assets on the website due to it's nature, is there a workaround for this?

David Henderson

David Henderson 0 points

  • 3 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

What's the error you're getting in the logs?

What action are you performing when the error occurs?

It isn't giving me any errors, it's just taking an age to load the assets when clicking on 'Select or upload an image' for example or when clicking on the assets page itself. I checked out https://forum.grabaperch.com/forum/11-30-2017-long-query-times-viewing-assets-app and it seems to be the same problem - I ran the same query as James did in phpmyadmin - this one below:

SELECT SQL_CALC_FOUND_ROWS DISTINCT r1.*, r2.resourceFile AS thumb, r2.resourceWidth AS thumbWidth, r2.resourceHeight AS thumbHeight, r2.resourceDensity AS thumbDensity FROM perch3_resources r1 LEFT OUTER JOIN perch3_resources r2 ON r2.resourceParentID=r1.resourceID AND r2.resourceKey='thumb' AND r2.resourceAWOL!=1 WHERE r1.resourceKey='orig' AND r1.resourceAWOL=0 ORDER BY r1.resourceUpdated DESC, r1.resourceID DESC LIMIT 0, 30

it took 26.5555 seconds, but it's more like 45 seconds to 1 minute when actually loading the assets page in Perch. I ran it again without ~~~SQL_CALC_FOUND_ROWS DISTINCT r1.*,~~~ and it took 0.3351 seconds.

If that gives any clues?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, it sounds like it might be the same issue.

Is there a patch coming for this?

Drew McLellan

Drew McLellan 2638 points
Perch Support

I'll need to have a look at it. If I find a cause then it'll be addressed in an update, but there won't be a patch issued.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Is it only happening when you perform an assets listing?

Drew McLellan

Drew McLellan 2638 points
Perch Support

See if 3.0.12 helps with this.

I can confirm that 3.0.12 has resolved the issue. Many Thanks Drew!