Laravel-Backpack / BackupManager

Admin interface for managing database and file backups in Backpack for Laravel
http://backpackforlaravel.com
Other
333 stars 93 forks source link

Configurable max_execution_time, so that backup doesn't trigger exception on shared hosting #82

Closed JeremyGuinn closed 4 years ago

JeremyGuinn commented 4 years ago

Bug report

What happened:

On shared hosting, the provider has prevented modifying resource limits.

Resource limits, e.g. memory (memory_limit, post_max_size, upload_max_filesize), runtime (max_execution_time, max_input_time) etc. MAY NOT be INCREASED or EXCEEDED.

ErrorException: ini_set(): Tried to raise runtime beyond limit (600/300).

A config or environment variable to specify this would be helpful.

welcome[bot] commented 4 years ago

Hello there! Thanks for opening your first issue on this repo! Just a heads-up: Here at Backpack we use Github Issues only for tracking bugs. Talk about new features is also acceptable. This helps a lot in keeping our focus on improving Backpack. If you issue is not a bug/feature, please help us out by closing the issue yourself and posting in the appropriate medium (see below). If you're not sure where it fits, it's ok, a community member will probably reply to help you with that. Backpack communication mediums:

Please keep in mind Backpack offers no official / paid support. Whatever help you receive here, on Gitter, Slack or Stackoverflow is thanks to our awesome awesome community members, who give up some of their time to help their peers. If you want to join our community, just start pitching in. We take pride in being a welcoming bunch. Thank you! -- Justin Case The Backpack Robot

tabacitu commented 4 years ago

Hmm... I don't think there's not much you can do in this case @JeremyGuinn ... other than changing the hosting provider, or asking them to manually increase it - sometimes they do that.

Sorry, can't be of any help in this case.

PS. This is more related to https://github.com/spatie/laravel-backup than BackupManager - this is just an interface that triggers their command.

JeremyGuinn commented 4 years ago

Its alright, I can work around it by overriding the routes and using a custom controller to change the ini_set(..).

JeremyGuinn commented 4 years ago

FYI: the error is caused in your BackupController, not in spatie's library. app\Controllers\BackupController.php

    public function create()
    {
        $message = 'success';

        try {
            ini_set('max_execution_time', 600);

            ....
tabacitu commented 4 years ago

Oooh... alright then, sorry for pointing you to them. Hmm.. maybe we should make this configurable then... so that people in your situation can easily change the value...

I'll reopen this so we take a look at it after we launch 4.1 - thanks!

pxpm commented 4 years ago

Hello @JeremyGuinn

You are totally right, sorry for taking so much time to get back into this.

I'v just submited PR #84 that should address this issue.

Wish you the best, Pedro