Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions deployment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,11 @@ kernel and return your project's root directory::
}
}

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.
Copy link
Member

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.

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.


.. _`Capifony`: https://github.com/everzet/capifony
.. _`Capistrano`: http://capistranorb.com/
.. _`sf2debpkg`: https://github.com/liip/sf2debpkg
Expand Down