FOGProject / fogproject

An open source computer cloning & management system
https://fogproject.org
GNU General Public License v3.0
1.09k stars 221 forks source link

Fix memory issues due to imagingLog and other logs #515

Closed abulhol closed 4 weeks ago

abulhol commented 1 year ago

We have been using FOG for many years. We are now on the dev-branch on Ubuntu 22.04, and still see issues like these:

Mon Nov 07 13:15:14.052211 2022] [proxy_fcgi:error] [pid 2535006] [client 192.168.0.2:50252] AH01071: Got error 'PHP message: PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 20480 bytes) in /var/www/fog/lib/fog/fogcontroller.class.php on line 260', referer: http://127.0.0.1:61000/fog/management/index.php?node=host

We usually follow the advice from the various forum posts, e.g. [1] and truncate the tables to make the pages functional again. We even think about adding a cronjob for this now to avoid the hassle.

It would be very helpful if this could be fixed in the FOG web app itself.

[1] https://forums.fogproject.org/topic/12336/allowed-memory-size-of-536870912-bytes-exhausted [2] https://forums.fogproject.org/topic/14560/upgrade-to-1-5-9-rc2-gone-wrong [3] https://forums.fogproject.org/topic/12045/fogcontroller-class-php-on-line-260-allowed-memory-size-of-3145728000-bytes-exhausted

lukebarone commented 1 year ago

I believe I have a shell script to take care of this, but I do not yet know if there's a specific process for adding to the cron during the install. I'll open a draft pull request

Sebastian-Roth commented 1 year ago

@lukebarone I am pretty sure this issue can (and actually should!) be fixed in the web UI.

Am 13. Dezember 2022 01:21:25 MEZ schrieb lukebarone @.***>:

I believe I have a shell script to take care of this, but I do not yet know if there's a specific process for adding to the cron during the install. I'll open a draft pull request

-- Reply to this email directly or view it on GitHub: https://github.com/FOGProject/fogproject/issues/515#issuecomment-1347565785 You are receiving this because you were assigned.

Message ID: @.***>

lukebarone commented 1 year ago

Alright, unfortunately I do not understand 75% of what I see in packages/web. I'll have to pass on this issue then :(

Sebastian-Roth commented 1 year ago

@lukebarone I didn't see you had this script drafted already (just checked the mails while being on the road). You are more than welcome to open a pull request and add this script to utils so people can use it manually.

Sebastian-Roth commented 1 year ago

@abulhol I started to look into this two weeks ago. There is a complex change needed to fix this properly (several places and dependencies). Though I had the time to fix this for 1.5.10 but turned out wrong. So I need to delay this topic.

abulhol commented 1 year ago

@Sebastian-Roth Thanks for looking into this. So https://github.com/FOGProject/fogproject/commit/ac023d6a119138e5042b9e766491ed3aa22f08dc is a workaround, but I need to call the script myself by cronjob I guess?

lukebarone commented 1 year ago

Depending how often it happens. It is meant to be a one-shot, but I'm interested in how long it takes for it is required again

On Sun, Mar 5, 2023, 11:45 p.m. Benjamin Gathmann @.***> wrote:

@Sebastian-Roth https://github.com/Sebastian-Roth Thanks for looking into this. So ac023d6 https://github.com/FOGProject/fogproject/commit/ac023d6a119138e5042b9e766491ed3aa22f08dc is a workaround, but I need to call the script myself by cronjob I guess?

— Reply to this email directly, view it on GitHub https://github.com/FOGProject/fogproject/issues/515#issuecomment-1455624124, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTQQFVXG2QNU7ICS6PJF7LW2WI2NANCNFSM6AAAAAARZGJSMM . You are receiving this because you were mentioned.Message ID: @.***>

Sebastian-Roth commented 1 year ago

@abulhol I had no intend to simply close this issue but just move it to the next milestone. No idea how that happened. I don't think I actually hit the "close this issue" button myself.

We'll definitely look into this once again with more time in the background.

abulhol commented 1 year ago

@Sebastian-Roth much appreciated!