zecure / shadowd_ui

The Shadow Daemon user interface
GNU General Public License v2.0
20 stars 9 forks source link

PHP Error 500 on the Rules Generator page #58

Open kast1450 opened 2 years ago

kast1450 commented 2 years ago

Despite changing my php.ini globally and enabling debug in the connector I was unable to generate any error logs. I changed no settings and Shadow Daemon is working properly, yet using the rules generator just generates an error 500 and does nothing.

https://i.imgur.com/VuAdDQK.png

zit-hb commented 2 years ago

Hey @kast1450,

please give this command a try:

./shadowdctl exec web cat app/logs/prod.log

kast1450 commented 2 years ago

Hello, it appears to be running out of memory. Is there any way to allocate more memory to the Shadow Daemon php?

zit-hb commented 2 years ago

Are you running this on Linux? By default the container will take the memory it needs from the host system. So I guess the host system just does not have enough memory. On Docker for Mac there is a default limit for memory per container. It can be increased though.

If you can't assign more memory to your system you can try to use the "include/exclude" filters at the bottom to generate the rules in multiple steps, e.g., only for specific directories.

kast1450 commented 2 years ago

The VM has 4GB memory, however viewing the logs the Shadow Daemon PHP file hits a maximum of 8MB of memory. Also yes, I am using Ubuntu 18.04 LTS

zit-hb commented 2 years ago

I completely forgot about the limitation by PHP itself. I will try to think of a permanent solution when I have time. For now I would recommend to edit the docker-compose.yml and to override the PHP configuration with a custom one. This way you can set the limits to whatever you like. You can do this with the volumes: attribute.