加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > PHP教程 > 正文

php – 10到15个XMPP消息后出现错误503

发布时间:2020-12-13 16:43:50 所属栏目:PHP教程 来源:网络整理
导读:我编写了一个XMPP守护程序(使用JAXL)来发送和接收消息,除了一个问题外,这些消息似乎正常. 我可以成功向我要发送的用户发送10到15条消息,之后我发送的任何消息都会返回 ???? message type ='error'...错误代码='503'类型='取消' /错误 / message 我正在使用Go
我编写了一个XMPP守护程序(使用JAXL)来发送和接收消息,除了一个问题外,这些消息似乎正常.

我可以成功向我要发送的用户发送10到15条消息,之后我发送的任何消息都会返回
????< message type ='error'...><错误代码='503'类型='取消'>< /错误>< / message>

我正在使用Google的会话服务器从Google Apps域发送到另一个Google Apps域.

没有发布我的所有代码,任何人都有任何想法可能导致这一点.令我困惑的是,我可以在它停止前先发送10到15条消息.

解决方法

听起来你正在打一个限速器.从 HTTP spec:

10.5.4 503 Service Unavailable

The server is currently unable to handle the request due to a
temporary overloading or maintenance of the server. The implication
is that this is a temporary condition which will be alleviated after
some delay. If known,the length of the delay MAY be indicated in a
Retry-After header. If no Retry-After is given,the client SHOULD
handle the response as it would for a 500 response.

一个表现良好的服务,我希望大多数谷歌服务,如果它是速率限制的东西,返回这样的响应将是正确的.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读