Vol*_*ire 2 python google-app-engine bulkloader
我想上传一个moderetly大小的csv文件使用bulkloader功能,谷歌应用程序引擎,它似乎通过与下面的结果死了一些方法:
[INFO ] Logging to bulkloader-log-20110328.181531
[INFO ] Throttling transfers:
[INFO ] Bandwidth: 250000 bytes/second
[INFO ] HTTP connections: 8/second
[INFO ] Entities inserted/fetched/modified: 20/second
[INFO ] Batch Size: 10
[INFO ] Opening database: bulkloader-progress-20110328.181531.sql3
[INFO ] Connecting to notmyrealappname.appspot.com/_ah/remote_api
[INFO ] Starting import; maximum 10 entities per post
...............................................................[INFO ] Unexpected thread death: WorkerThread-7
[INFO ] An error occurred. Shutting down...
.........[ERROR ] Error in WorkerThread-7: <urlopen error [Errno -2] Name or service not known>
[INFO ] 1740 entites total, 0 previously transferred
[INFO ] 720 entities (472133 bytes) transferred in 32.3 seconds
[INFO ] Some entities not successfully transferred
Run Code Online (Sandbox Code Playgroud)
它上传了我试图上传的19k条目中的大约700条,我想知道它为什么会失败.我检查了csv文件中的错误,比如可以抛弃python csv阅读器的其他逗号,并且非ascii字符已被删除.
提升批量限制(batch_size)和rps限制(rps_limit)有效,我使用1000作为批量大小,rps限制为500:
appcfg.py upload_data --url= --application= --filename= --email= --batch_size=1000 --rps_limit=500
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
583 次 |
| 最近记录: |