Skip to content

Commit 4f6a521

Browse files
committed
increased max execution to process large generations of certs
1 parent bb27935 commit 4f6a521

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

app/CertificateParticipation.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ class CertificateParticipation
3838

3939
public function __construct($name_for_certificate, $event_name, $event_date)
4040
{
41-
ini_set('max_execution_time', 300); // Set max execution time to 300 seconds
41+
ini_set('max_execution_time', 600); // Set max execution time to 600 seconds
42+
ini_set('memory_limit', '512M'); // Set memory limit to 512 MB (adjust as needed)
43+
4244
$this->name_of_certificate_holder = $name_for_certificate;
4345
$this->event_name = $event_name;
4446
$this->event_date = $event_date;
@@ -127,7 +129,7 @@ protected function run_pdf_creation(): void
127129
. escapeshellarg($this->resource_path . '/' . $this->personalized_template_name . '.tex');
128130

129131
$process = Process::fromShellCommandline($command, $this->resource_path);
130-
$process->setTimeout(600); // Set 600 seconds timeout
132+
$process->setTimeout(600); // Allow up to 600 seconds for execution
131133
$this->execute_process($process);
132134

133135
if (!$process->isSuccessful()) {

0 commit comments

Comments
 (0)