[GH-ISSUE #1718] Sync out of memory #941

Closed
opened 2026-02-26 02:34:42 +03:00 by kerem · 2 comments
Owner

Originally created by @prysme01 on GitHub (Oct 25, 2023).
Original GitHub issue: https://github.com/koel/koel/issues/1718

Using the latest docker version

   ValueError 

  fread(): Argument #2 ($length) must be greater than 0

  at vendor/james-heinrich/getid3/getid3/getid3.php:2215
    2211▕                       //if (($this->getid3->memory_limit > 0) && ($bytes > $this->getid3->memory_limit)) {
    2212▕                       if (($this->getid3->memory_limit > 0) && (($bytes / $this->getid3->memory_limit) > 0.99)) { // enable a more-fuzzy match to prevent close misses generating errors like "PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 33554464 bytes)"
    2213▕                               throw new getid3_exception('cannot fread('.$bytes.' from '.$this->ftell().') that is more than available PHP memory ('.$this->getid3->memory_limit.')', 10);
    2214▕                       }
  ➜ 2215▕                       $part = fread($this->getid3->fp, $bytes);
    2216▕                       $partLength  = strlen($part);
    2217▕                       $bytes      -= $partLength;
    2218▕                       $contents   .= $part;
    2219▕               } while (($bytes > 0) && ($partLength > 0));

  1   vendor/james-heinrich/getid3/getid3/getid3.php:2215
      fread()

docker file is supposed to have 512M php memory limit on it.
I don't understand why it is not working.
I've also try to add - PHP_MEMORY_LIMIT=2048M without any luck.

Originally created by @prysme01 on GitHub (Oct 25, 2023). Original GitHub issue: https://github.com/koel/koel/issues/1718 Using the latest docker version ``` ValueError fread(): Argument #2 ($length) must be greater than 0 at vendor/james-heinrich/getid3/getid3/getid3.php:2215 2211▕ //if (($this->getid3->memory_limit > 0) && ($bytes > $this->getid3->memory_limit)) { 2212▕ if (($this->getid3->memory_limit > 0) && (($bytes / $this->getid3->memory_limit) > 0.99)) { // enable a more-fuzzy match to prevent close misses generating errors like "PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 33554464 bytes)" 2213▕ throw new getid3_exception('cannot fread('.$bytes.' from '.$this->ftell().') that is more than available PHP memory ('.$this->getid3->memory_limit.')', 10); 2214▕ } ➜ 2215▕ $part = fread($this->getid3->fp, $bytes); 2216▕ $partLength = strlen($part); 2217▕ $bytes -= $partLength; 2218▕ $contents .= $part; 2219▕ } while (($bytes > 0) && ($partLength > 0)); 1 vendor/james-heinrich/getid3/getid3/getid3.php:2215 fread() ``` docker file is supposed to have 512M php memory limit on it. I don't understand why it is not working. I've also try to add - PHP_MEMORY_LIMIT=2048M without any luck.
kerem closed this issue 2026-02-26 02:34:42 +03:00
Author
Owner

@thearyadev commented on GitHub (Oct 26, 2023):

just ran into this issue myself.

I was trying to add songs by LE SSERAFIM. The original tracks had tagging that wasn't in English, maybe that is the problem?
When I re-tagged with Lidarr, it was able to sync.

image

hope this helps!

<!-- gh-comment-id:1780330836 --> @thearyadev commented on GitHub (Oct 26, 2023): just ran into this issue myself. I was trying to add songs by LE SSERAFIM. The original tracks had tagging that wasn't in English, maybe that is the problem? When I re-tagged with Lidarr, it was able to sync. ![image](https://github.com/koel/koel/assets/87589047/a9c45cc4-c207-4448-9554-315ec25b4229) hope this helps!
Author
Owner

@prysme01 commented on GitHub (Oct 27, 2023):

I had to try and catch to find the guilty album..
I did not find why this error occurs but I've removed the guilty album.

<!-- gh-comment-id:1782908611 --> @prysme01 commented on GitHub (Oct 27, 2023): I had to try and catch to find the guilty album.. I did not find why this error occurs but I've removed the guilty album.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/koel-koel#941
No description provided.