OPNsense Forum

English Forums => General Discussion => Topic started by: Azgar on May 02, 2024, 12:45:15 PM

Title: Allowed memory size of 1073741824 bytes exhausted for opnsense 24.1
Post by: Azgar on May 02, 2024, 12:45:15 PM
Hello,

After an update of opnsense (23.7.8 -> 24.1) I have an error: "PHP Fatal error:  Allowed memory size of 1073741824 bytes exhausted (tried to allocate 1042288640 bytes) in /usr/local/opnsense/mvc/app/models/OPNsense/Routing/Migrations/M1_0_0.php on line 101" while the system memory is used at 22% (total 8 GB)

I have seen threads regarding this error. For version 22 there was a patch to apply.

Is it the same for version 24.1?

Thanks for your help.
Title: Re: Allowed memory size of 1073741824 bytes exhausted for opnsense 24.1
Post by: Patrick M. Hausen on May 02, 2024, 12:56:34 PM
Probably - I have not tested, in /usr/local/etc/php.ini change:
memory_limit = 1G
to
memory_limit = 2G

and restart the WebUI service.

HTH,
Patrick
Title: Re: Allowed memory size of 1073741824 bytes exhausted for opnsense 24.1
Post by: franco on May 02, 2024, 01:01:37 PM
How many routes do you have? oO


Cheers,
Franco
Title: Re: Allowed memory size of 1073741824 bytes exhausted for opnsense 24.1
Post by: Azgar on May 02, 2024, 02:21:02 PM
Hello,

Thank you for your reply.

I tried to change the PHP memory from 1 to 2GB but the message still appears after repeating opnsense. Before restarting I cleared the error. I noticed that it reset the value to 1GB after restarting the web service

I don't have a static route but in "system->routes->status" I have 12 routes managed by the system in IPv4 and 3 in IPv6 but we don't use IPv6.

I have 4 interfaces, one of which is a gateway to another network
Title: Re: Allowed memory size of 1073741824 bytes exhausted for opnsense 24.1
Post by: Azgar on May 02, 2024, 05:00:57 PM
Hello,

I'm here to provide an update:

Concerning the php memory I modify it from the file "/usr/local/opnsense/service/templates/OPNsense/WebGui/php.ini" because "/usr/local/etc/php.ini" is based on this file.

after removing the error and restarting opnsense, the red dot still appears (red-point.png)



when I click on it there is no longer any report unlike before (report.png). is this normal?
Title: Re: Allowed memory size of 1073741824 bytes exhausted for opnsense 24.1
Post by: volrath87 on May 10, 2024, 09:42:37 AM
Same for me .. Do you have any fix?
Title: Re: Allowed memory size of 1073741824 bytes exhausted for opnsense 24.1
Post by: franco on May 14, 2024, 12:12:21 PM
Hi,

This was fixed today: https://github.com/opnsense/core/commit/cf03557581b

# opnsense-patch cf03557581b


Cheers,
Franco