Skip to content

Commit

Permalink
increase memory limit
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmorbo committed Dec 31, 2023
1 parent 38c44e7 commit 52f448e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ ADD . /app

RUN composer install --no-dev --no-interaction --no-progress --no-scripts --optimize-autoloader

CMD ["php", "bin/console", "server:run", "--ip=0.0.0.0", "--port=8080"]
RUN echo 'memory_limit = 2048M' >> /usr/local/etc/php/conf.d/docker-php-memlimit.ini;

CMD ["php", "bin/console", "server:run", "--ip=0.0.0.0", "--port=8080"]
7 changes: 6 additions & 1 deletion src/Controller/InstanceController.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use Carbon\Carbon;
use Clue\React\SQLite\DatabaseInterface;
use DateTimeZone;
use Exception;
use Fig\Http\Message\StatusCodeInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Log\LoggerInterface;
Expand Down Expand Up @@ -357,7 +358,11 @@ function (array $data) use ($channelId, $start, $end) {
),
], $content)
);
});
})->catch(fn(Exception $e) => resolve(Response::json([
'from' => $from->format('Y-m-d H-i-s'),
'to' => $to->format('Y-m-d H-i-s'),
'error' => $e->getMessage()
])));
}
);
}
Expand Down

0 comments on commit 52f448e

Please sign in to comment.