[Koha-bugs] [Bug 8437] Plack and database backup

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sat Aug 4 15:17:38 CEST 2012


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8437

Dobrica Pavlinusic <dpavlin at rot13.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Signed Off                  |In Discussion

--- Comment #7 from Dobrica Pavlinusic <dpavlin at rot13.org> ---
This patch fixes errors under plack but doesn't work for large backup files.

The problem is in download_backup which tries to print data back to browser in
64K chunks. Under plack, that gets buffered in memory and with backup of our
production database it dies after a while and returns zero length file.

Correct way to fix this is to issue redirect under plack in download_backup
to some plack handled URL so we don't read whole file in memory.

I don't know how to detect plack if we are running under plack since script is
inside CGI::Compile, but we could use environment variable to signal that we
are under plack.

That would, however, require us to have some kind of koha.psgi in which we can
implement this in master.

I also had to remove 

&& not $filename =~ m#|#

from download_backup to make download work at all, so I will have to remove
signed-off on this patch, sorry.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list