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

Axios 调用 JavaApi 发生 timeout of 10000ms exceeded #1

Open
ronliruonan opened this issue Apr 28, 2019 · 1 comment
Open

Axios 调用 JavaApi 发生 timeout of 10000ms exceeded #1

ronliruonan opened this issue Apr 28, 2019 · 1 comment

Comments

@ronliruonan
Copy link
Owner

ronliruonan commented Apr 28, 2019

{ Error: timeout of 10000ms exceeded
at createError (/home/app/publish/node/node-sso/node_modules/axios/lib/core/createError.js:16:15)
at Timeout.handleRequestTimeout [as _onTimeout] (/home/app/publish/node/node-sso/node_modules/axios/lib/adapters/http.js:216:16)
at ontimeout (timers.js:436:11)
at tryOnTimeout (timers.js:300:5)
at listOnTimeout (timers.js:263:5)
at Timer.processTimers (timers.js:223:10)
config:
{ adapter: [Function: httpAdapter],
transformRequest: { '0': [Function: transformRequest] },
transformResponse: { '0': [Function: transformResponse] },
timeout: 10000,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
validateStatus: [Function: validateStatus],
headers:
{ Accept: 'application/json, text/plain, /',
'User-Agent': 'axios/0.18.0' },
method: 'get',
url:
'http://xxx/javaapi/xiangxiaoqiang001',
data: undefined },
code: 'ECONNABORTED',
request:
Writable {
_writableState:
WritableState {
objectMode: false,
highWaterMark: 16384,
finalCalled: false,
needDrain: false,
ending: false,
ended: false,
finished: false,
destroyed: false,
decodeStrings: true,
defaultEncoding: 'utf8',
length: 0,
writing: false,
corked: 0,
sync: true,
bufferProcessing: false,
onwrite: [Function: bound onwrite],
writecb: null,
writelen: 0,
bufferedRequest: null,
lastBufferedRequest: null,
pendingcb: 0,
prefinished: false,
errorEmitted: false,
emitClose: true,
bufferedRequestCount: 0,
corkedRequestsFree: [Object] },
writable: true,
_events:
[Object: null prototype] {
response: [Function: handleResponse],
error: [Function: handleRequestError] },
_eventsCount: 2,
_maxListeners: undefined,
_options:
{ maxRedirects: 21,
maxBodyLength: 10485760,
protocol: 'http:',
path:
'/javaapi/xiangxiaoqiang001',
method: 'get',
headers: [Object],
agent: undefined,
auth: undefined,
hostname: 'xxx',
port: '7000',
nativeProtocols: [Object],
pathname:
'/javaapi/xiangxiaoqiang001' },
_ended: true,
_ending: true,
_redirectCount: 0,
_redirects: [],
_requestBodyLength: 0,
_requestBodyBuffers: [],
_onNativeResponse: [Function],
_currentRequest:
ClientRequest {
_events: [Object],
_eventsCount: 6,
_maxListeners: undefined,
output: [],
outputEncodings: [],
outputCallbacks: [],
outputSize: 0,
writable: true,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: false,
useChunkedEncodingByDefault: false,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: 0,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
socket: [Socket],
connection: [Socket],
_header:
'GET /javaapi/xiangxiaoqiang001 HTTP/1.1\r\nAccept: application/json, text/plain, /\r\nUser-Agent: axios/0.18.0\r\nHost: xxxx:7000\r\nConnection: close\r\n\r\n',
_onPendingData: [Function: noopPendingOutput],
agent: [Agent],
socketPath: undefined,
timeout: undefined,
method: 'GET',
path:
'/javaapi/xiangxiaoqiang001',
_ended: false,
res: null,
aborted: 1556268661316,
timeoutCb: null,
upgradeOrConnect: false,
parser: [HTTPParser],
maxHeadersCount: null,
_redirectable: [Circular],
[Symbol(isCorked)]: false,
[Symbol(outHeadersKey)]: [Object] },
_currentUrl:
'http://xxx/javaapi/xiangxiaoqiang001' },
response: undefined }

@ronliruonan ronliruonan reopened this Apr 28, 2019
@ronliruonan ronliruonan changed the title Axiostimeout of 10000ms exceeded Axios 调用 JavaApi 发生 timeout of 10000ms exceeded Apr 28, 2019
@ronliruonan
Copy link
Owner Author

直接并发压测JavaApi时,并不存在timeout,so 上面是咋回事儿?

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

1 participant