有赞新零售社区

发帖
API使用问题»有赞订单列表查询接口返回超时

[API调用-商品/交易] 有赞订单列表查询接口返回超时

晶晶酱 2022-10-31 2550 浏览 1 评论 | 只看楼主 [打印]
1、调用的接口
接口名:youzan.trades.sold.get
2、请求参数
{"aPIParams":{"end_update":1667145600000,"page_no":2,"page_size":100,"start_update":1667059200000},"gateway":"[color=var(--common_text_blue1_color,#007fff)]https://open.youzanyun.com","headers":{},"httpMethod":"POST","name":"youzan.trades.sold.get","oAuthType":"TOKEN","paramModelClass":"com.youzan.cloud.open.sdk.gen.v4_0_2.model.YouzanTradesSoldGetParams","version":"4.0.2"}

3、问题现象
com.youzan.cloud.open.sdk.common.exception.SDKException: code:102,message:timeout        at com.youzan.cloud.open.sdk.core.client.http.DefaultHttpClient.send(DefaultHttpClient.java:104)        at com.youzan.cloud.open.sdk.core.client.executor.AbstractExecutor.executionMethod(AbstractExecutor.java:45)        at com.youzan.cloud.open.sdk.core.client.executor.AbstractExecutor.execute(AbstractExecutor.java:34)Caused by: java.net.SocketTimeoutException: timeout        at okio.Okio$4.newTimeoutException(Okio.java:232)        at okio.AsyncTimeout.exit(AsyncTimeout.java:285)        at okio.AsyncTimeout$2.read(AsyncTimeout.java:241)        at okio.RealBufferedSource.indexOf(RealBufferedSource.java:354)
[2022-10-31 09:11:34.741] [ERROR][SpanId:N/A] [xmkp-trade-channel] [Thread-386] [c.x.x.t.c.y.s.impl.YouZanFetchOrderServiceImpl] [queryYzOrders] [134] - 调用有赞订单列表查询接口失败com.youzan.cloud.open.sdk.common.exception.SDKException: code:102,message:timeout        at com.youzan.cloud.open.sdk.core.client.http.DefaultHttpClient.send(DefaultHttpClient.java:104)        at com.youzan.cloud.open.sdk.core.client.executor.AbstractExecutor.executionMethod(AbstractExecutor.java:45)        at com.youzan.cloud.open.sdk.core.client.executor.AbstractExecutor.execute(AbstractExecutor.java:34)        at com.youzan.cloud.open.sdk.core.client.core.DefaultYZClient.getResponseBody(DefaultYZClient.java:61)        at com.youzan.cloud.open.sdk.core.client.core.DefaultYZClient.invoke(DefaultYZClient.java:42)        at com.ximalaya.xmkp.trade.channel.yz.service.impl.YouZanFetchOrderServiceImpl.queryYzOrders(YouZanFetchOrderServiceImpl.java:131)        at com.ximalaya.xmkp.trade.channel.yz.service.impl.YouZanFetchOrderServiceImpl.fetchOrders(YouZanFetchOrderServiceImpl.java:59)        at com.ximalaya.xmkp.trade.channel.yz.service.impl.YouZanOrderServiceImpl.lambda$getOrders$0(YouZanOrderServiceImpl.java:57)        at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1640)        at java.lang.Thread.run(Thread.java:748)Caused by: java.net.SocketTimeoutException: timeout        at okio.Okio$4.newTimeoutException(Okio.java:232)        at okio.AsyncTimeout.exit(AsyncTimeout.java:285)        at okio.AsyncTimeout$2.read(AsyncTimeout.java:241)        at okio.RealBufferedSource.indexOf(RealBufferedSource.java:354)        at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:226)        at okhttp3.internal.http1.Http1Codec.readHeaderLine(Http1Codec.java:215)        at okhttp3.internal.http1.Http1Codec.readResponseHeaders(Http1Codec.java:189)        at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:88)        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)        at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:45)        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)        at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)        at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)        at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:126)        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)        at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:254)        at okhttp3.RealCall.execute(RealCall.java:92)        at com.youzan.cloud.open.sdk.core.client.http.DefaultHttpClient.send(DefaultHttpClient.java:102)        ... 9 common frames omittedCaused by: java.net.SocketException: Socket closed        at java.net.SocketInputStream.read(SocketInputStream.java:204)        at java.net.SocketInputStream.read(SocketInputStream.java:141)        at sun.security.ssl.InputRecord.readFully(InputRecord.java:465)        at sun.security.ssl.InputRecord.read(InputRecord.java:503)        at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:975)        at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:933)        at sun.security.ssl.AppInputStream.read(AppInputStream.java:105)        at okio.Okio$2.read(Okio.java:140)        at okio.AsyncTimeout$2.read(AsyncTimeout.java:237)        ... 29 common frames omitted[2022-10-31 09:11:34.741] [ERROR][SpanId:N/A] [xmkp-trade-channel] [Thread-386] [c.x.x.t.c.y.s.impl.YouZanFetchOrderServiceImpl] [queryYzOrders] [134] - 调用有赞订单列表查询接口失败com.youzan.cloud.open.sdk.common.exception.SDKException: code:102,message:timeout        at com.youzan.cloud.open.sdk.core.client.http.DefaultHttpClient.send(DefaultHttpClient.java:104)        at com.youzan.cloud.open.sdk.core.client.executor.AbstractExecutor.executionMethod(AbstractExecutor.java:45)        at com.youzan.cloud.open.sdk.core.client.executor.AbstractExecutor.execute(AbstractExecutor.java:34)        at com.youzan.cloud.open.sdk.core.client.core.DefaultYZClient.getResponseBody(DefaultYZClient.java:61)        at com.youzan.cloud.open.sdk.core.client.core.DefaultYZClient.invoke(DefaultYZClient.java:42)        at com.ximalaya.xmkp.trade.channel.yz.service.impl.YouZanFetchOrderServiceImpl.queryYzOrders(YouZanFetchOrderServiceImpl.java:131)        at com.ximalaya.xmkp.trade.channel.yz.service.impl.YouZanFetchOrderServiceImpl.fetchOrders(YouZanFetchOrderServiceImpl.java:59)        at com.ximalaya.xmkp.trade.channel.yz.service.impl.YouZanOrderServiceImpl.lambda$getOrders$0(YouZanOrderServiceImpl.java:57)        at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1640)        at java.lang.Thread.run(Thread.java:748)Caused by: java.net.SocketTimeoutException: timeout        at okio.Okio$4.newTimeoutException(Okio.java:232)        at okio.AsyncTimeout.exit(AsyncTimeout.java:285)        at okio.AsyncTimeout$2.read(AsyncTimeout.java:241)        at okio.RealBufferedSource.indexOf(RealBufferedSource.java:354)        at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:226)        at okhttp3.internal.http1.Http1Codec.readHeaderLine(Http1Codec.java:215)        at okhttp3.internal.http1.Http1Codec.readResponseHeaders(Http1Codec.java:189)        at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:88)        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)        at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:45)        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)        at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)        at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)        at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:126)        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)        at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:254)        at okhttp3.RealCall.execute(RealCall.java:92)        at com.youzan.cloud.open.sdk.core.client.http.DefaultHttpClient.send(DefaultHttpClient.java:102)        ... 9 common frames omittedCaused by: java.net.SocketException: Socket closed        at java.net.SocketInputStream.read(SocketInputStream.java:204)        at java.net.SocketInputStream.read(SocketInputStream.java:141)        at sun.security.ssl.InputRecord.readFully(InputRecord.java:465)        at sun.security.ssl.InputRecord.read(InputRecord.java:503)        at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:975)        at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:933)        at sun.security.ssl.AppInputStream.read(AppInputStream.java:105)        at okio.Okio$2.read(Okio.java:140)        at okio.AsyncTimeout$2.read(AsyncTimeout.java:237)        ... 29 common frames omitted
用手机打开
收藏 ··· 回复
    您好,1、请求超时请先确认:订单批量接口start_created和end_created或start_update和end_update时间间隔是否大于3个月,大于就会出现上述错误。
    2、如果不是时间间隔的问题这个接口因为是批量拉取订单的,基于系统稳定性的考虑有整体客户的限流控制,如果其他商家QPS较高的话是会出现您这边调用返回超时的情况。您这边可以重试一下。
    • 叫獸 2022-11-01
      您好,我是KA售前风轻,商家这边遇到的问题,烦请帮进一步核实:

      1. 商家查询的时间范围是2022年10月30日00:00~2022年10月31日00:00,既10月30号当天的订单数据,时间范围未超出。 时间格式采用13位时间戳,该格式是否可行?
      2. 商家的查询频率为每天9:10 以及10:00 查询两次前一天的数据,只查询这2次。按日志反馈,进一周均查询失败,都是提示超时。
      3. 商家调用该接口是为了获取推广转化订单的数据,第一步拉取全天订单信息,第二步获取推广转化订单号,目前第一步的接口调用一直超时,导致第二步获取数据无法执行,请帮验证该问题,以下为涉及的接口:
      a. youzan.trades.sold.get
      b. youzan.bigdata.datacenter.psmanage.get.psorder
    • 冬日暖阳 回复 叫獸 2022-11-01
      麻烦您提供一下trace_id
    • trace_id是请求成功之后有赞返回的,现在是请求超时失败了,没有trace_id
    • 冬日暖阳 回复 晶晶酱 2022-11-03
      您好,麻烦您补充一下调用接口时使用的access_token值+接口名称(包括版本号)+具体调用时间+请求参数值。方便精准获取日志解决问题。

    1跳至
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    复制链接
    新浪微博
    QQ空间
    微信扫码
    • 回复

    • 评分

    客服工作时间是9:00-18:00,客服妹子当前不在线,若不能及时回复请谅解。试试右上角的搜索吧,论坛有丰富的经验贴、公告贴,相信一定能够帮到您~

    复制成功