Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error: Allowed memory size of ... bytes exhausted (tried to allocate ..bytes) #151

Open
foliengriller opened this issue Mar 30, 2023 · 8 comments

Comments

@foliengriller
Copy link

Describe the bug
If I click on the backend on "download traffic", PHP runs out of memory.
So the problem is, that the default tries to load all entities from database, what causes the memory problem.
So it would be great, if there would be a default, that does not load everything ;-)

Environment (please complete the following information):

  • Extension Version: v5.0.0-rc1
  • TYPO3 Version: 11.5.25
  • Browser chrome
  • Web Server Apache 2.4
  • PHP Version: 8.2.4
@balasch
Copy link
Contributor

balasch commented May 8, 2023

How high is a PHP process memory? How many log entries are there in the database?

@foliengriller
Copy link
Author

foliengriller commented Dec 18, 2023

Hi,
there are ~70.000 entries in the logs-table. The memory_limit is 256M.
I use version 5.0.3 and TYPO3 11.5.33

bmgrieger added a commit that referenced this issue Mar 19, 2024
bmgrieger added a commit that referenced this issue Mar 20, 2024
#197)

* [TASK] Performance improvement for backend module with many download log entries #151 [TER-187] [TER-188]

* [TASK] Add second parameter for integer values in createNamedParameter #151 [TER-187] [TER-188]
@ghwaldo
Copy link

ghwaldo commented Mar 22, 2024

Same Problem here.
For a test the privider enabled 1024 MB, then ist worked.
Now i am at the limit of 512 and the error occures.
It only happens on larger files (200MB+).
Is there a way to chunk the resonse ?

I'm using Version 6.0.1 on TYPO3 12.

@balasch
Copy link
Contributor

balasch commented Mar 22, 2024

We are working on a solution, see PR #198. Version 6.0.2 is coming soon.

@ghwaldo
Copy link

ghwaldo commented Mar 22, 2024

Thanks for your great Work. I Just wondered If #198 is the same problem.
It looks like perforance prob, but this one is about memory usage.

It seems the whole File is read into the response at once. This is too much memory usage.

I looked at your code but found no way to work around this.

I found other discussion on how to do such things with extbase. But i did not find a solution until now.

@balasch
Copy link
Contributor

balasch commented Mar 25, 2024

Thanks for your great Work. I Just wondered If #198 is the same problem. It looks like perforance prob, but this one is about memory usage.

It seems the whole File is read into the response at once. This is too much memory usage.

I looked at your code but found no way to work around this.

I found other discussion on how to do such things with extbase. But i did not find a solution until now.

I think you mean a different problem. This problem concerns the download of the logs in the backend. And this problem is currently being fixed.
Please do not mix the errors.

@ghwaldo
Copy link

ghwaldo commented Mar 25, 2024

Thanks for your great Work. I Just wondered If #198 is the same problem. It looks like perforance prob, but this one is about memory usage.
It seems the whole File is read into the response at once. This is too much memory usage.
I looked at your code but found no way to work around this.
I found other discussion on how to do such things with extbase. But i did not find a solution until now.

I think you mean a different problem. This problem concerns the download of the logs in the backend. And this problem is currently being fixed. Please do not mix the errors.

OK, sorry.
Should i open a new Issue ? Or is there a way for createing large downloads ? It worked with older versions in TYPO3 9.5.
After upgrading to TYPO3 V12 and secure_downloads 6.0.1 only files below 150MB are delivered.
We have for example files with 280MB, and a test showed, that we would have to increase to 1GB memory limit, but that is not possible on this provider, he allowed only the test.

@balasch
Copy link
Contributor

balasch commented Mar 25, 2024

Thanks for your great Work. I Just wondered If #198 is the same problem. It looks like perforance prob, but this one is about memory usage.
It seems the whole File is read into the response at once. This is too much memory usage.
I looked at your code but found no way to work around this.
I found other discussion on how to do such things with extbase. But i did not find a solution until now.

I think you mean a different problem. This problem concerns the download of the logs in the backend. And this problem is currently being fixed. Please do not mix the errors.

OK, sorry. Should i open a new Issue ? Or is there a way for createing large downloads ? It worked with older versions in TYPO3 9.5. After upgrading to TYPO3 V12 and secure_downloads 6.0.1 only files below 150MB are delivered. We have for example files with 280MB, and a test showed, that we would have to increase to 1GB memory limit, but that is not possible on this provider, he allowed only the test.

Yes, please create a new issue. I assumed that this error would no longer occur with 5.x or 6.x. Strange

bmgrieger added a commit that referenced this issue Mar 26, 2024
* [TASK] Performance improvement for backend module with many download log entries #151 [TER-187] [TER-188]

* [TASK] Add second parameter for integer values in createNamedParameter #151 [TER-187] [TER-188]

* [BUGFIX] Use \PDO::PARAM_INT instead of \PDO::INT #151 [TER-187] [TER-188]

* [TASK] Prepare release of version 5.0.4 [TER-187] [TER-188]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants