ipalaus / geonames

A collection of models and commands to get all the power of GeoNames in Eloquent ORM.
MIT License
63 stars 34 forks source link

Importer timed out on --development seed #1

Closed hskrasek closed 9 years ago

hskrasek commented 10 years ago

I was running the importer with the --development option enabled, and one of the Seeders timed out. Wish I knew which one, because when I manually ran each seeder that would have ran during the ImportCommands process individually, it worked just fine.

Could it be due to my Vagrant box not having the fastest specs? Just thought I'd ping you to see what it could be.

hskrasek commented 10 years ago

I have discovered it is the HierarchiesTableSeeder. Maybe it needs a longer timeout period, or the ability to disable the timeout.

ipalaus commented 10 years ago

I've been checking the timeout and actually it's 10 minutes.

Can you try to modify that file locally and give it a try with a higher value? A null value will disable the timeout.

hskrasek commented 10 years ago

Sure, I also found that doing a single Country, say for example the US times out as well, which is not surprising seeing as that the .TXT file contains roughly 2 million+ "names".

I was thinking of an idea that involved chunking up the main US.txt file, and then spinning off processes to handle the smaller chunks to lessen the chance of a timeout.

hskrasek commented 10 years ago

No luck, the null timeout got me past the first hiccup, and then gave me this error on the Timezones seeder:

[RuntimeException]
Killed

ipalaus commented 10 years ago

How much RAM do you have in your Vagrant box?

hskrasek commented 10 years ago

This was actually on our staging server this attempt, which has about 1GM of RAM.

ipalaus commented 10 years ago

Hmm... I'll give it a try later tonight or tomorrow with a smaller box and see if I can reproduce the error. I let you know asap! Thanks for reporting :)

On Fri, Jan 3, 2014 at 6:32 AM, Hunter Skrasek notifications@github.comwrote:

This was actually on our staging server this attempt, which has about 1GM of RAM.

— Reply to this email directly or view it on GitHubhttps://github.com/ipalaus/geonames/issues/1#issuecomment-31506282 .

Isern Palaus http://ipalaus.com

hskrasek commented 10 years ago

The Vagrant box actually has the same amount of RAM. Something tells me this wont be an issue on the production server which has 8GB of RAM, but want to at least try and get it to work with 1GB to know itll work for sure with more RAM.

hskrasek commented 10 years ago

Just wanted to check in, any luck with the smaller box? I can get the DevelopmentSeeder to work on the 1GB, but the CountryNameSeeder with US as the argument not so much.

nitper commented 10 years ago

The combination of #12 and turning off query logging in laravel should solve your problems. Once query logging is off, it shouldn't use very much memory at all.