-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mmap() failed: [12] Cannot allocate memory #6
Comments
Looks like the split files are too big for your Homestead set up. Look inside: I set the lines per split file as a constant at the top of that file. Run a test on your Homestead install where you manually edit that const value before you run the install command. Lower it to 1000 for starters. If that solves your problem, then I can add lines per split file as an option for the install command. |
I was experiencing a similar issue using WampServer during the alternate names import. The culprit was "DB::enableQueryLog();" on line 389 of the AlternateNames.php file mentioned above. The query logging was generating memory for each record created until it reached critical failure. Commenting out/removing line 389 fixed the issue. |
@tpelham42 Bingo. I'll remove that in the next release. |
They were causing the system to run out of memory. #6
Running, "php artisan geonames:install" on a homestead installations eventually runs out of memory. PHP memory usage increases until all available memory is consumed. Not sure is this a system configuration issue or an issue with the alternate names command.
Split file #289 of 2583 has 5000 rows.
Inserting alternate names 1359/5000 [▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░░░░░░] 27%
mmap() failed: [12] Cannot allocate memory
mmap() failed: [12] Cannot allocate memory
PHP Fatal error: Out of memory (allocated 4495486976) (tried to allocate 16384 bytes) in /vagrant/dr-services/vendor/laravel/framework/src/Illuminate/Database/Connection.php on line 330
mmap() failed: [12] Cannot allocate memory
mmap() failed: [12] Cannot allocate memory
PHP Fatal error: Out of memory (allocated 4495486976) (tried to allocate 65536 bytes) in /vagrant/dr-services/vendor/laravel/framework/src/Illuminate/Auth/SessionGuard.php on line 18
The text was updated successfully, but these errors were encountered: