[Bug 8437] Large database backups and large exports from export.pl fail under plack

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[Bug 8437] Large database backups and large exports from export.pl fail under plack


--- Comment #29 from David Cook <[hidden email]> ---
(In reply to Kyle M Hall from comment #24)
> Avoiding plack will 'fix' the script, but most likely cause everyone to stop
> looking for an actual solution. That's my worry. That being said, it's
> probably better to get it working in the near-term.

I'm looking at export.pl and thinking how export.pl's job should be to
authenticate the user, process user input about what to download, and then
direct the user somewhere else better suited to serving files...

This is kind of interesting although perhaps not relevant in our hybrid
CGI/PSGI way of doing things, and it's old so doesn't take into account that
X-Sendfile seems deprecated:

But it does make the point that trying to serve a large file from Perl is going
to be slow.

It might be worth looking at frameworks using Plack to see how they do it. For
example send_file and _send_file in Dancer:

Or we could look at
https://metacpan.org/release/Plack/source/lib/Plack/App/File.pm, although that
looks like it uses PSGI magic to send the file too, which would be tricky in
our hybrid environment.

You are receiving this mail because:
You are watching all bug changes.
Koha-bugs mailing list
[hidden email]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/