barcodebuddy icon indicating copy to clipboard operation
barcodebuddy copied to clipboard

PHP message: PHP Fatal error: Maximum execution time of 30 seconds exceeded in /app/bbuddy/index.php on line 498

Open reskes opened this issue 1 year ago • 2 comments

Hi,

I'm getting the error above with the latest barcodebuddy version.

The web interface is inaccessible due to the error.

After some debugging I've found the underlying problem. It is caused by the logs / "Processed Barcodes"-Section, when the amount of log lines are very high. For some reason I've got 50k+ entries in my logs.

My fix was that I limited the amount of log lines displayed. For example only the last 50 entries.

my new index.php, lines 498-501:
 $logs = array_splice($logs, 0, 50); 
foreach ($logs as $log) {
 $html->addHtml($log . "<br>"); 
}

reskes avatar Jul 26 '24 16:07 reskes

Thanks for the feedback! Out of interest, how did you end up with 50k+ entries?

Forceu avatar Jul 26 '24 16:07 Forceu

Better not ask 😆 My Barcodebuddy instance seems to lose the connection to Grocy very frequently. And that mainly generates those lines. Need to investigate more when I got some spare time for it.

reskes avatar Jul 26 '24 21:07 reskes