PHP memory exhausted on a big mass update

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • goingUp
    Junior Member
    • Sep 2024
    • 23

    #1

    PHP memory exhausted on a big mass update

    I did a mass update over thousands of records (adding Team) and process just silently stopped processing only 4k records. I found this error in log:
    ERROR: (0) Uncaught Exception Spatie\Async\Output\ParallelError: "PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 16384 bytes) in /var/www/html/application/Espo/ORM/Executor/DefaultSqlExecutor.php on line 77 " at /var/www/html/vendor/spatie/async/src/Output/ParallelError.php line 11 :: /var/www/html/vendor/spatie/async/src/Output/ParallelError.php(11)

    Espo Version 9.1.8​, from official docker image.

    I know that this error is hard to fix, so I'm filing it as a feature request to be ready for a huge datasets . Perhaps ultimate solution can be unbuffered query, if framework allows it.​
  • yuri
    EspoCRM product developer
    • Mar 2014
    • 9219

    #2
    The mass update is not supposed to cause the memory limit issue. If it does in some cases, it needs to be fixed.
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    • yuri
      EspoCRM product developer
      • Mar 2014
      • 9219

      #3
      It's unlikely related to the query result. It could be that some reference is not removed after each iteration. The SthCollection does not store entities in memory. In the RelationsMap, a week map is used. I have no idea where the memory leak could happen. Maybe some customization?
      If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

      Comment

      Working...