Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

续写报错,看起来像是超时了 #1

Closed
fatinghenji opened this issue Dec 29, 2021 · 3 comments
Closed

续写报错,看起来像是超时了 #1

fatinghenji opened this issue Dec 29, 2021 · 3 comments

Comments

@fatinghenji
Copy link

fatinghenji commented Dec 29, 2021

  • mirai版本号:v2.9.0
  • 在服务器上使用了代理,利用geoip进行分流,关闭代理后报错依旧存在。
  • 报错log:
2021-12-29 14:09:54 E/CaiyunAI: io.ktor.network.sockets.SocketTimeoutException: Socket timeout has expired [url=https://if.caiyunai.com/v2/novel/61cbf8a
175a4fadf11b151e8/novel_ai, socket_timeout=unknown] ms                                                                                                  
io.ktor.network.sockets.SocketTimeoutException: Socket timeout has expired [url=https://if.caiyunai.com/v2/novel/61cbf8a175a4fadf11b151e8/novel_ai, sock
et_timeout=unknown] ms                                                                                                                                  
        at io.ktor.client.features.HttpTimeoutKt.SocketTimeoutException(HttpTimeout.kt:207)                                                             
        at io.ktor.client.engine.okhttp.OkUtilsKt.mapOkHttpException(OkUtils.kt:77)                                                                     
        at io.ktor.client.engine.okhttp.OkUtilsKt.access$mapOkHttpException(OkUtils.kt:1)                                                               
        at io.ktor.client.engine.okhttp.OkHttpCallback.onFailure(OkUtils.kt:39)                                                                         
        at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:510)                                                                          
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)                                                    
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)                                                    
        at java.base/java.lang.Thread.run(Thread.java:829)                                                                                              
Caused by: java.net.SocketTimeoutException: timeout                                                                                                     
        at okio.SocketAsyncTimeout.newTimeoutException(JvmOkio.kt:143)                                                                                  
        at okio.AsyncTimeout.access$newTimeoutException(AsyncTimeout.kt:162)                                                                            
        at okio.AsyncTimeout$source$1.read(AsyncTimeout.kt:340)                                                                                         
        at okio.RealBufferedSource.indexOf(RealBufferedSource.kt:449)                                                                                   
        at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.kt:333)                                                                        
        at okhttp3.internal.http1.HeadersReader.readLine(HeadersReader.kt:29)                                                                           
        at okhttp3.internal.http1.Http1ExchangeCodec.readResponseHeaders(Http1ExchangeCodec.kt:178)
        at okhttp3.internal.connection.Exchange.readResponseHeaders(Exchange.kt:106)
        at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.kt:79)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100)
        at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:34)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100)
        at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:82)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100)
        at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100)
        at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100)
        at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:197)
        at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:502)
        ... 3 more
Caused by: java.net.SocketTimeoutException: Read timed out
        at java.base/java.net.SocketInputStream.socketRead0(Native Method)
        at java.base/java.net.SocketInputStream.socketRead(SocketInputStream.java:115)
        at java.base/java.net.SocketInputStream.read(SocketInputStream.java:168)
        at java.base/java.net.SocketInputStream.read(SocketInputStream.java:140)
        at java.base/sun.security.ssl.SSLSocketInputRecord.read(SSLSocketInputRecord.java:478)
        at java.base/sun.security.ssl.SSLSocketInputRecord.readHeader(SSLSocketInputRecord.java:472)
        at java.base/sun.security.ssl.SSLSocketInputRecord.bytesInCompletePacket(SSLSocketInputRecord.java:70)
        at java.base/sun.security.ssl.SSLSocketImpl.readApplicationRecord(SSLSocketImpl.java:1364)
        at java.base/sun.security.ssl.SSLSocketImpl$AppInputStream.read(SSLSocketImpl.java:973)
        at okio.InputStreamSource.read(JvmOkio.kt:90)
        at okio.AsyncTimeout$source$1.read(AsyncTimeout.kt:129)
        ... 20 more
@LaoLittle
Copy link
Owner

读超时了,默认是10s超时,若续写太久就可能导致这样的问题,尝试修改时长为30s

@LaoLittle
Copy link
Owner

LaoLittle commented Dec 29, 2021

@fatinghenji
Copy link
Author

1.05问题解决

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants