Out of memory exception when creating a comment in the talk folder
Open
Nobody has claimed this yet.
1. to develop
25-feedback
bug
feature: filesystem
performance 🚀
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
Quickly checked the logs after @maximelehericy mentioned this issue to me in a call:
Steps to reproduce:
- Have a large talk folder (2 folders 1.6k files)
- Create a comment on a file within the talk folder
{
"reqId": "ThkQ1IR9QtOa3338LSFX",
"level": 3,
"time": "2023-01-12T13:52:59+00:00",
"remoteAddr": "xx.xx.xx.xx",
"user": "maxime",
"app": "PHP",
"method": "POST",
"url": "/remote.php/dav/comments/files/6979069",
"message": "Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) at /var/www/cloud.nextcloud.com/nextcloud/lib/private/Files/Cache/Cache.php#189",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:108.0) Gecko/20100101 Firefox/108.0",
"version": "25.0.3.1",
"data": {
"app": "PHP"
},
"id": "63c010cfcb00b"
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the POST to /remote.php/dav/comments/files/6979069 with a large talk folder, then inspect lib/private/Files/Cache/Cache.php around line 189 and the reported PHP memory log. Trace the comment-creation path to identify why the large folder exhausts memory; done means the comment can be created without the reported out-of-memory exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100