-
- Notifications
You must be signed in to change notification settings - Fork 5.3k
Add item to troubleshoot about Out of memory and SELinux #10599
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
Conversation
deployment.rst Outdated
Out of memory when accessing /web/app.php | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| ||
Some UNIX systems make use of SELinux, specially Red Hat distributions, like CentOS. By default SELinux is set to enforcing as it should be. If you deploy with app_dev.php you will see some weird permission errors even if you set 777 to `var` directory inside your project's folder. To resolve this, either set SELinux configuration correctly or disable it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
either set SELinux configuration correctly or disable it
.
I don't see any value in this if you say to someone configure it correctly
you aren't really helping them. Also, SELinux is a security feature, I don't think we should recommend people to disable it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're, I should have written SELinux commands then or fully omit this phrase. I'll remove that.
Removing text where I suggested to disable SELinux when the correct should be only suggesting to configure it correctly.
Out of memory when accessing /web/app.php | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| ||
Some UNIX systems make use of SELinux, specially Red Hat distributions, like CentOS. By default SELinux is set to enforcing as it should be. If you deploy with app_dev.php you will see some weird permission errors even if you set 777 to `var` directory inside your project's folder. To resolve this set SELinux configuration correctly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The headline talks about "out of memory" errors while the paragraph is about "permission errors". Can we be more precise what would be the indicator for SELinux being the cause here?
Also, the headline is about app.php
while the text talks about app_dev.php
. Which file is meant here?
Last but not least: "set SELinux configuration correctly" is not really helpful. What is "correctly"? We should at least link to some resource that explains in more details what's going on and how to solve the problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The headline talks about "out of memory" errors while the paragraph is about "permission errors". Can we be more precise what would be the indicator for SELinux being the cause here?
My intention was to describe the error first, then the cause of it. That's why the title is "Out of memory" but the solution is about permissions. The main reason for SELinux being the cause would be that disabling it or setting it to permissive mode, wouldn't throw such error, although I now agree that it isn't the best way to identify SELinux as the root cause. I'll work on that.
Also, the headline is about app.php while the text talks about app_dev.php. Which file is meant here?
In Symfony 3.x, there are two main app files: app.php
and app_prod.php
. While deploying with app_prod.php
is the right way in production environments, it only shows the Out of memory ...
error. In development environment (with SELinux set to enforcing), and using the app.php
file, named personally as app_dev.php
, so I could address each with the correctly environment, the error would be about permissions, because it's more verbose than app_prod.php
. Therefore, different errors are shown using both files, but both from the same cause.
Last but not least: "set SELinux configuration correctly" is not really helpful. What is "correctly"? We should at least link to some resource that explains in more details what's going on and how to solve the problem.
I agree, I'll work on that too.
@fabianoaraujo-egsys we appreciate your help ... but the proposed docs looks too "niche" to me. It only applies when using SELinux. We prefer to not add these details about external tools because they are very hard to maintain (none of doc maintainers use SELinux, so we can't neither verify this nor keep this updated). We only make exceptions for external tools which are used by most people (e.g. Apache and nginx for servers). For these reasons, we're closing this pull request without merging it, but I hope you understand it. Thanks! |
While deploying in a CentOS, I've had problems with SELinux and no hint about it being the problem while trying to write in var directory inside my project's folder. This commit adds and item in Troubleshooting section so developers can have some hint abou this same problem.