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

High memory usage ends in fatal error #443

Closed
slackmoehrle opened this issue Mar 28, 2017 · 6 comments
Closed

High memory usage ends in fatal error #443

slackmoehrle opened this issue Mar 28, 2017 · 6 comments
Labels

Comments

@slackmoehrle
Copy link

I am seeing this error, but I don't see a fix.

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 64 bytes) in phar://daux.io/daux.phar/libs/Tree/Directory.php on line 51

Line 51 is a } and I don't see where else this change would make sense.

@onigoetz
Copy link
Collaborator

Hello, the case of the memory is not necessarily related to a specific line of code.

How big is your documentation ?

@slackmoehrle
Copy link
Author

slackmoehrle commented Mar 29, 2017 via email

@onigoetz
Copy link
Collaborator

Okay, that's probably why, because when creating the documentation it takes all pages in memory and writes them down after.

Is your documentation public by any chance so I can make some tests and improve Daux's behaviour on big projects ?

If not, I will try to replicate your case with dummy pages and hope to get some improvements.

In the meantime, can you try to update to the latest daux version and/or to change your memory parameters ? (memory_limit in php.ini)

@onigoetz onigoetz changed the title fatal error High memory usage ends in fatal error May 11, 2017
@onigoetz onigoetz added the Bug label May 11, 2017
@onigoetz
Copy link
Collaborator

onigoetz commented Jun 6, 2017

Hello @slackmoehrle, sorry for the long wait, I didn't have too much time on side projects these past months.

I made some improvements in how Daux handles big documentation and their memory usage.

I created a documentation with over 2'700 pages and reduced its memory usage to a minimum. It certainly changes from on documentation to another, but I hope this fix helps you.

You can test it by downloading the latest dev-masterversion in packagist. I hope to be able to make a release of this soon.

@onigoetz
Copy link
Collaborator

onigoetz commented Jun 6, 2017

By the way, if you still have problems, you might want to disable the search feature, to generate it, all files have to be kept in memory at the same time, this is one of the main causes of memory usage in the daux generator.

@slackmoehrle
Copy link
Author

@onigoetz Thanks, I will update my install and test things out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants