对于AppEngine应用程序,Maxmind数据库文件太大 [英] Maxmind database file too large for AppEngine App

查看:170
本文介绍了对于AppEngine应用程序,Maxmind数据库文件太大的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图将MaxMind geoIP数据库部署为部署在Google AppEngine中的Java应用程序的一部分。当我们使用免费版本时,事情可以正常工作,但升级到付费(和更大)数据库时,尝试部署会出现错误:

 文件/tmp/appcfg4412552511405829763.tmp/WEB-INF/GeoIPCity.dat过大(限制32000000字节)

据我所知,我已启用jar拆分功能,但这没有帮助,因为这不是jar(将其重命名为.jar并不会奇迹般地修复它)。有什么办法可以将这么大的文件(~48mb)作为AppEngine应用程序的一部分进行部署?



我的备用计划是将文件推入云存储并抓取它从那里。不幸的是,Maxmind的Java代码确实需要一个文件 - 而不是一个流,而不是一个读取器,而不是一个字节[],而是一个文件 - 这在AppEngine中很难实现。在我重写一堆东西之前,我想我会看看是否有人已经设法解决这个问题。

解决方案

在GAE上,最大应用文件大小为32Mb

AFAIK你无法解决这个问题。如果你可以将它分成较小的文件,那最好。


I'm trying to deploy the MaxMind geoIP database as part of a Java app deployed in Google AppEngine. Things worked okay when we were using the free version, but upon upgrading to the paid-for (and larger) database, trying to deploy gives the error:

File /tmp/appcfg4412552511405829763.tmp/WEB-INF/GeoIPCity.dat is too large (limit 32000000 bytes)

As far as I can tell, I have jar splitting enabled, but that doesn't help because this isn't a jar (renaming it to .jar doesn't magically fix it either :). Is there any way to get a file this large (~48mb) deployed as part of an AppEngine app?

My fallback plan is to shove the file in Cloud Storage and grab it from there. Unfortunately, Maxmind's Java code really really wants a File - not a Stream, not a Reader, not a byte[], but a File - which is hard to come by in AppEngine. Before I end up re-writing a bunch of stuff, I figured I'd see if anyone had managed to solve this problem already.

解决方案

On GAE the max application file size is 32Mb.

AFAIK you can not work around that. It would be best if you could split that in smaller files.

这篇关于对于AppEngine应用程序,Maxmind数据库文件太大的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆