Open aerni opened 1 year ago
Update. After a few hours, the asset container doesn't timeout anymore and the asset now shows in the CP. I have a feeling that it took that long to analyze the asset for the metadata. However, performing a simple task like renaming the asset and we're back to timing out.
I can confirm, that the rename actually did happen when looking at the asset in the Digital Ocean dashboard. But the metadata file wasn't renamed yet. I'm pretty sure that metadata is the issue here. It's probably still analyzing the huge file which causes the server to crash.
We use https://github.com/JamesHeinrich/getID3 under the hood to get meta data about videos.
It reads the file. I'm guessing reading a 10gb file will take a while. 😄
When you say it crashes, is it just that request? Do all requests start throwing errors?
Maybe you can see something on that repo that gives a hint about handling larger files?
Yeah, all requests start spinning. Have to reboot PHP to make it work again. Can't see any errors in the console or in the logs. I'll do some digging on that repo.
I did some further testing and added the 10GB file to a local asset container. I used ray()->measure()
in the fromAsset
method of the ExtractInfo
class to measure the performance. Generating the metadata took about 30ms. So the getID3
library doesn't seem to be the issue.
The issue seems to be the combination with S3. I've got the same file on a DO Space. I created a new asset container and used the S3 disk. I then renamed the file in the CP. Renaming took a few minutes until it even hit the fromAsset
method. And the generating of metadata took 13 minutes!
I'm not sure if there is anything that can be done on the Statamic side of things? Maybe pushing things into a queue could help.
Bug description
I've got a private Digital Ocean Space whose content I'd like to see in the CP. So, I created an asset container and selected my S3 disk. The asset container in the CP loads forever and eventually crashes the server. There's only one file, but it's a 10GB mp4. I suppose this isn't meant to handle large assets?
How to reproduce
Logs
No response
Environment
Installation
Fresh statamic/statamic site via CLI
Antlers Parser
runtime (new)
Additional details
No response