Ticket #80 (new defect)

Opened 16 months ago

Last modified 5 months ago

Prevent database backup function from hitting memory limit

Reported by: Tobias Owned by: admin
Priority: major Milestone: 1.7.*
Component: general Version: 1.7
Keywords: backup, memory limit Cc:

Description

While trying to backup my WassUp database I ran into the memory limit of my server's PHP. The problem is caused by the backup function which adds all the SQL statements to put into the backup file to a single variable (being over 10 MB of text in my case).

To fix this problem search for the following code in wassup.php (try line 2696):

$sql .= " \n" . $entries . implode(', ', $values) . ') ;';

Insert this code fragment after the line shown above:

print $sql;	// Print to make sure you don't run into memory limits...
$sql = '';	// ... and clear afterwards.

This code sends the SQL statements to the client regularly rather than waiting until all statements have been read.

Version affected is 1.6.3.

Cheers, Tobias

Attachments

Change History

Changed 5 months ago by Tobias

  • version changed from 1.6 to 1.7
  • type changed from enhancement to defect
  • milestone changed from 1.6.* to 1.7.*

This bug is still open in version 1.7.2.1. Please fix it. It's quite annoying and not that complex to fix.

Add/Change #80 (Prevent database backup function from hitting memory limit)

Author



Change Properties
<Author field>
Action
as new
as The resolution will be set. Next status will be 'closed'
to The owner will change. Next status will be 'new'
The owner will change to anonymous. Next status will be 'assigned'
 
Note: See TracTickets for help on using tickets.