后端“进程移动到不同的机器”并失败,错误500 [英] Backend "Process moved to a different machine" and fails withh error 500

查看:114
本文介绍了后端“进程移动到不同的机器”并失败,错误500的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个过程需要大约五分钟才能完成。它在后端实例中每两个小时运行一次cron作业。



最近该进程已经开始失败;不是每次都是一天几次。发生的第一件事是,memcache开始抛出异常:

  04:21:13.640 com.google.appengine.api。 memcache.LogAndContinueErrorHandler handleServiceError:memcache中的服务错误
com.google.appengine.api.memcache.MemcacheServiceException:Memcache get:获取1个键的异常(ItemFollowableCompleted:RegionUS:P8XD:0)
,位于com.google。 appengine.api.memcache.MemcacheServiceApiHelper $ RpcResponseHandler.handleApiProxyException(MemcacheServiceApiHelper.java:68)
at com.google.appengine.api.memcache.MemcacheServiceApiHelper $ 1.absorbParentException(MemcacheServiceApiHelper.java:109)

这些都不是致命异常,但是几秒钟后,流程终止而没有警告或关闭消息。日志显示

  04:21:30.591过程移至另一台机器。 

,错误500.

这是一个与memcache相关的谷歌基础结构问题,或者在应用程序代码中是否有可能导致它的东西?解析方案

不,它是不是Google基础架构中的错误。您的流程预计会在需要时在实例之间移动(维护,更多的需求来自您的方面......),并且您无法做到阻止它。

尽管如此,您还是可以采取一些措施来缓解您的应用可能产生的任何影响。



查看[1],了解如何跟踪您的待处理当你的实例关闭时,你也可以看看后台线程。



我猜你正在使用Python,如果没有,请查找相应的语言。



[1] https://developers.google.com/appengine/docs/python/backends/#Python_Backend_states


I have a process that takes around five minutes to complete. It runs on a cron job every two hours in a backend instance.

Recently the process has started to fail; not every time but a few times a day. First thing that happens is that the memcache starts to throw exceptions:

04:21:13.640 com.google.appengine.api.memcache.LogAndContinueErrorHandler handleServiceError: Service error in memcache
com.google.appengine.api.memcache.MemcacheServiceException: Memcache get: exception getting 1 key (ItemFollowableCompleted:RegionUS:P8XD:0)
at com.google.appengine.api.memcache.MemcacheServiceApiHelper$RpcResponseHandler.handleApiProxyException(MemcacheServiceApiHelper.java:68)
at com.google.appengine.api.memcache.MemcacheServiceApiHelper$1.absorbParentException(MemcacheServiceApiHelper.java:109)

None of these are fatal exceptions but a few seconds later the process terminated without warning or shutdown message. Logs show

04:21:30.591 Process moved to a different machine.

and an error 500.

Is this a google infrastructure problem related to memcache or is there something in the app code that could be causing it?

解决方案

No, it's not an error in Google infrastructure. Your process is expected to be moved among instances when needed (maintenance, more demand from your side, ...), and there's nothing you can do to prevent it.

Nonetheless there are a few things you could do to alleviate any effect this could have in your app.

Look [1] for some suggestions on how to keep track of your pending jobs when your instance is shut down and also have a look at the background threads.

I'm guessing you're using Python, if not, look for your corresponding language.

[1] https://developers.google.com/appengine/docs/python/backends/#Python_Backend_states

这篇关于后端“进程移动到不同的机器”并失败,错误500的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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