django-cities icon indicating copy to clipboard operation
django-cities copied to clipboard

import reliability issues

Open techdragon opened this issue 9 years ago • 6 comments
trafficstars

The import seems to have some serious reliability issues. While I'm sure some of these aren't due to cities doing the wrong thing. The situation around importing the data is very frustrating.

  • The complete lack of visibility into the cause of a failure is extremely frustrating for such an otherwise excellent library.
  • The issues where corrupted and more importantly, interrupted files in the data directory will prevent future attempts to import data.
  • Lack of an option to use existing data files particularly uncompressed ones, hampers efforts to avoid failed data imports.

That's my big three, and so this isn't all negative, :smile: I don't mind writing a PR for specifying existing files as the import source assuming that such a feature is a welcome addition. Since this has been slowing down some integration testing work.

techdragon avatar Jan 30 '16 07:01 techdragon

Yeah, I kinda think it would be better to simply use the 'requests' library and keep all of the downloads in memory, but that's just my opinion and I haven't checked how big some of the downloaded files are. Etags and hashes of the file contents can help track different versions of files to keep from downloading and reimporting data.

blag avatar Feb 01 '16 02:02 blag

@blag some of them are a respectable number of megabytes. I've spent this week with 1Mbps internet and re-discovered a lot about how small is relative.

Also, I discovered this week that the current approach is 'troublesome' on AWS Elastic Beanstalk due to root folder ownership as a result of how libraries are installed into the environment. Having an option to specify "use this file ~/hypothetical/file/path.txt, its compressed|already uncompressed" is still needed, and could in theory serve as the 'building block' for more automatic commands via use of call_command(), temp files, requests, etc.

techdragon avatar Feb 07 '16 22:02 techdragon

@techdragon thanks for creating the issue.

Are you unable to track down the problem even with logging enabled, or do you not have logging enabled?

Can you give some more details around what you've experienced with corrupted files, and wanting to reuse existing files, and what's not currently working there for you?

coderholic avatar Feb 13 '16 00:02 coderholic

Downloading files to disk breaks deployment in simple Docker containers because they only have read-only filesystems.

blag avatar Jun 08 '16 05:06 blag

@blag you can always use Docker volumes, although I agree this complicates the deployment strategy

davidmarquis avatar Jul 18 '16 16:07 davidmarquis

vote +1, I've problem too when import alt_name data, it's just freezing there, without any progress....

hayyyyyyden avatar May 17 '17 09:05 hayyyyyyden