Asset Listing failing at around 1,500 items


(Jamie Smith) #1

Matrix version: 5.4.0.1

I have an Asset Listing pointing at the Submissions and Incomplete Submissions folders of a Custom Form. The said listing page (which is paginated by 50 submissions at a time) is failing (for non-system admin users) at around 1,500 Form Submission assets. In the browser console I’m getting a 400 Bad Request related to a metadata keyword not being replaced with it’s actual value, and it looks like assets referenced via the ./?a= method are also not being converted to their respective URLs. Looking at the page source, it renders (with missing keyword replacements) until the start of the HTML table where the form submissions are listed.

As a system admin, the page renders correctly for me.

I’ve looked in the Matrix logs and there don’t appear to be any errors related to the asset listing page. Any idea what might be causing this issue?

Cheers!


(David Schoen) #2

When Matrix renders a page it echo’s all of the content (including most raw keywords) in to a PHP output buffer.

If PHP has certain kinds of fatal errors before that buffer has the keywords replaced in it, PHP will end up sending whatever was in the buffer at the time out to the browser (including raw keywords like ./?a=123 instead of the url of that asset).

Basically what’s happening is that as a sys admin or root user Matrix has to do fewer permission checks while rendering the page, so is able to render more items. As a restricted user more permissions need to be checked, more data is loaded in to memory as the page renders and eventually you’re hitting some kind of fatal error to do with running out of memory. The error should show up in either fpm or web server (apache or nginx) error logs.

Edit: gave example of what I mean by raw keyword.


(Tbaatar) #3

I’m curious to know why you are asset listing that many form submissions?

It just seems like a bad practice.


(Jamie Smith) #4

Hi David. Thank you for responding. That’s useful to know. The only relevant thing I can find in the logs is in Matrix’s performance.log:

Listing page #xxxxxx is trying to list 2307 assets, which exceeds the performance monitor threshold of 1000.

I found Asset Listing Item Limit (concerning a listing of 2656 assets), which seems to suggest upping the memory in System Configuration > PHP Configuration > Web Memory Limit. I’ll speak with my server admin colleague about increasing this.

If you have any other suggestions, too, please do let me know. Many thanks.