Bug #2950

Upgrading RRD upgrade from 2.0 causes Out of Memory on 128MB embedded systems

Added by Seth Mos about 1 year ago. Updated 8 months ago.

Status:Resolved Start date:04/15/2013
Priority:Urgent Due date:
Assignee:- % Done:

0%

Category:Upgrade
Target version:2.1
Affected version:2.1 Affected Architecture:

Description

I performed some upgrade testing related to ticket #2935 and #2123

It turns out that the current upgrade code when coming from a 2.0 config (version 8.0) will cause the RRD upgrade to run in the 080_081 step. This causes the restore page to throw a internal server error because PHP goes out of memory on a 128MB system. Navigate to the upgrade page again and the system reboots with the 2.0 config still in place.

On next boot the config will be upgraded from 2.0 and it performs the RRD ugprade in the 1st step. This causes PHP to get killed with a Out of Memory condition (OOM). This has the rather nasty side effect of killing boot and thus a system without interfaces dead in the water.

My proposal is to put this RRD modification code into atleast a seperate upgrade script to prevent a OOM and effectively kill the system.
Another huge drawback of using PHP to upgrade the RRD files currently is that it is dog slow to perform this on a Alix, which can easily take 20 minutes, regardless of the memory issue.

I've also confirmed with a bare config that a 128MB system can barely boot safely. With a 128MB install and no swap it succeeds, lower this to a 120MB and it already fails to start everything at boot with a OOM. Bring it down to a 100 and it fails to boot for the better part and does not bring up all interfaces correctly.

Ideally we would have a seperate program to convert the RRD files in another language from PHP for speed and memory usage.

Associated revisions

Revision fcaa56b1
Added by Seth Mos about 1 year ago

Install Plan B for upgrading the RRD files to the newer format to add IPv6 fields.
We now perform a search and replace on the XML contents to add fields instead of reading the XML into a PHP array.
A conversion with a 2.0 config on a 128MB VM without swap is succesful, needs more testing.
Ticket #2950

History

#1 Updated by Renato Botelho 12 months ago

  • Status changed from New to Feedback

#2 Updated by Chris Buechler 8 months ago

  • Status changed from Feedback to Resolved

still an RRD upgrade issue on nano but that's covered elsewhere

Also available in: Atom PDF