Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

PadreAlessandro's avatar

Unable to allocate memory for the Laravel Octane Swoole tables

I am working on a geographic map server based on Laravel Octane with Swoole. The server is created with Forge and DigitalOcean. Everything works fine including Octane routes and Octane Swoole tables. I can easily write and read data from memory. But when I try to prefill the Swoole tables with the complete set of geodata (~1Gb), after successfully filling about 600Mb I always run into issue "unable to allocate memory". However till this point the server has more then 1.5Gb of free memory out of 4Gb. It seems like there is a limit for the Octane Swoole tables which I don't know how to control. Is it? Any ideas how to solve the problem?

Production error:

Swoole\Table::set(): failed to set('z7y71x80'), unable to allocate memory {"exception":"[object] (ErrorException(code: 0): Swoole\Table::set(): failed to set('z7y71x80'), unable to allocate memory at /home/forge/map.blitztest.ru/app/Console/Commands/CacheMapTiles.php:64)

Octane Swoole tables configuration:

'tables' => [ 'tiles:21844' => [ 'table' => 'int:1', ], 'tiles1:9910' => [ 'tile' => 'string:1000', ], 'tiles2:1508' => [ 'tile' => 'string:10000', ], 'tiles3:888' => [ 'tile' => 'string:30000', ], 'tiles4:1149' => [ 'tile' => 'string:50000', ], 'tiles5:2219' => [ 'tile' => 'string:70000', ], 'tiles6:1758' => [ 'tile' => 'string:90000', ], 'tiles7:2100' => [ 'tile' => 'string:110000', ], 'tiles8:1631' => [ 'tile' => 'string:130000', ], 'tiles9:681' => [ 'tile' => 'string:176906', ], ],

0 likes
0 replies

Please or to participate in this conversation.