Ticket #80 (new defect)
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
Note: See
TracTickets for help on using
tickets.
