Skip to content
This repository has been archived by the owner on Jul 23, 2023. It is now read-only.

PHP Error 500 on the Rules Generator page #58

Open
kast1450 opened this issue Dec 11, 2021 · 5 comments
Open

PHP Error 500 on the Rules Generator page #58

kast1450 opened this issue Dec 11, 2021 · 5 comments
Assignees
Labels

Comments

@kast1450
Copy link

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

zit-hb commented Dec 11, 2021

Hey @kast1450,

please give this command a try:

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

@kast1450
Copy link
Author

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

@zit-hb
Copy link
Member

zit-hb commented Dec 13, 2021

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
Copy link
Author

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

zit-hb commented Dec 17, 2021

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.

@zit-hb zit-hb transferred this issue from zecure/shadowd Feb 20, 2022
@zit-hb zit-hb added the bug label Feb 20, 2022
@zit-hb zit-hb self-assigned this Feb 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants