geonames
geonames copied to clipboard
error seeding
I've executed php artisan geonames:import --country="ES" and fails after a while.
here console last output:
....
Seeded: ContinentsTableSeeder
Seeded: CountriesTableSeeder
Seeded: AdminDivionsTableSeeder
Seeded: AdminSubdivionsTableSeeder
[Symfony\Component\Process\Exception\RuntimeException]
The process has been signaled with signal "11".
I've tried with all countries and put at importer a ini_set('memory_limit', '-1');
but:
[RuntimeException]
php(690,0xa04c11d4) malloc: *** mach_vm_map(size=262144) failed (error code
=3)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
PHP Fatal error: Out of memory (allocated -746848256) (tried to allocate 3
2769 bytes) in /Users/carlituxman/dvp/laravel/geonames/vendor/ipalaus/geona
mes/src/Importer.php on line 332
php(690,0xa04c11d4) malloc: *** mach_vm_map(size=262144) failed (error code
=3)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
the problem is with the last line of file allCountries.txt: 5927710 Coral Lake Coral Lak
Hey @carlituxman, I'll try to give it a go this week but I'm a little bit busy. Even tho, it's weird that allCountries.txt is the file that gives the error when you're trying to import the "ES" countries.
I need to put ini_set('memory_limit' '-1') for correct execution with ES countries. With allCountries.txt is impossible, I need unzip manually because the file only have 348mb, and the error of Coral Lake not happen, but it throws out of memory.
Well, that's normal as it's an intense use. I'm not sure a ini_set()
should be in the core. I'm pretty sure my php.ini for CLI has a no memory limit. Using symfony/process I'm trying to get rid of most of the memory leaks that the command can generate.
You could also do php -d memory_limit=128M artisan geonames:import
. Give it a go so you don't have to touch your php.ini.
Error after AdminSubdivionsTableSeeder
[RuntimeException]
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried t
o allocate 32769 bytes)
Can you do a local edit to https://github.com/ipalaus/geonames/blob/master/src/Commands/ImportCommand.php#L234 ? Add the memory limit command after the php execution and try.
error too
[RuntimeException]
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32769 bytes) in /Users/carlituxman/dvp/laravel/geonames/vendor/ipalaus/geonames/src/Importer.php
Any news on this?