Skip to content
This repository has been archived by the owner on Nov 26, 2021. It is now read-only.

error seeding #21

Open
carlituxman opened this issue Mar 11, 2015 · 9 comments
Open

error seeding #21

carlituxman opened this issue Mar 11, 2015 · 9 comments

Comments

@carlituxman
Copy link

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".

@carlituxman
Copy link
Author

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

@carlituxman
Copy link
Author

the problem is with the last line of file allCountries.txt:
5927710 Coral Lake Coral Lak

@ipalaus
Copy link
Owner

ipalaus commented Mar 16, 2015

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.

@carlituxman
Copy link
Author

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.

@ipalaus
Copy link
Owner

ipalaus commented Mar 16, 2015

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.

@carlituxman
Copy link
Author

Error after AdminSubdivionsTableSeeder
[RuntimeException]
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried t
o allocate 32769 bytes)

@ipalaus
Copy link
Owner

ipalaus commented Mar 16, 2015

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.

@carlituxman
Copy link
Author

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

@cmoralesweb
Copy link

Any news on this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants